findClosest

Finds the closest point to the given point.

Param: point = The point to find the closest point to mesh = The mesh to index.

@nogc nothrow pure
ptrdiff_t
findClosest
(
inout(vec2) point
,
inout(vec2)[] mesh
)

Return Value

Type: ptrdiff_t

The vertex index of the closest point, or -1 if there is no points in the mesh.

Meta