distanceSquared property

double distanceSquared

The square of the magnitude of the offset.

This is cheaper than computing the distance itself.

Implementation

double get distanceSquared => _dx * _dx + _dy * _dy;