This method calculates the distance from P to a node.
Syntax: DistanceToNode(P: TFloatPoint; node: integer): double