added a `distanceToPoint()` and `angleToPoint()` function