getDistanceSquared method

double getDistanceSquared()

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;