getDistanceSquared method
The square of the magnitude (which is the distance of this point from (0, 0)) of the ExpressivePoint.
This is cheaper than computing the getDistance itself.
Implementation
double getDistanceSquared() => x * x + y * y;
The square of the magnitude (which is the distance of this point from (0, 0)) of the ExpressivePoint.
This is cheaper than computing the getDistance itself.
double getDistanceSquared() => x * x + y * y;