Calculates the closest height point on a triangle using barycentric coordinates.
The point to project
First triangle vertex
Second triangle vertex
Third triangle vertex
Height at position, or NaN if point is not inside triangle
Calculates the closest height point on a triangle using barycentric coordinates.