double magnitude

Get the straight line (Euclidean) distance between the origin (0, 0) and this point.

Source

double get magnitude => sqrt(x * x + y * y);