magnitude property

  1. @override
double get magnitude
override

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

Example:

var magnitude = const Point(0, 0).magnitude; // 0.0
magnitude = const Point(10, 0).magnitude;  // 10.0
magnitude = const Point(0, -10).magnitude; // 10.0
magnitude = const Point(10, 10).magnitude;  // 14.142135623730951

Implementation

@override
double get magnitude => $value.magnitude;