magnitude property

double get magnitude

The magnitude (length) of the vector from the origin (0,0).

Implementation

double get magnitude => hypot(x, y);