distance property

double get distance

The magnitude of the offset.

If you need this value to compare it to another Offset's distance, consider using distanceSquared instead, since it is cheaper to compute.

Implementation

double get distance => math.sqrt(dx * dx + dy * dy);