Declaration

func nearestPoint(to location: CGPoint) -> (point: CGPoint, pathTime: CGFloat)?

Return Value

The nearest point and its path time, or nil when no nearest point can be determined.

Discussion

A path time identifies a position within a path segment. Its integer part is the index of the ending on-curve node, and its fractional part is the position within the segment.

See Also

Path Time