# `GSPath nearestPointOnPath:pathTime:`

*Instance Method*

Finds the point on the path nearest a point.

## Declaration

```objc
- (NSPoint) nearestPointOnPath:(NSPoint) loc pathTime:(CGFloat *) pathTime;
```

```python
nearestPointOnPath_pathTime_(loc: NSPoint, pathTime: float) -> NSPoint
```

## Parameters

- `pathTime` — On return, the path time of the nearest point.

## Return Value

The nearest point.

## 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

- [`GSPath pointAtPathTime:`](/Core/GlyphsCore/GSPath/pointAtPathTime:) — The point at a path time.
- [`GSPath nearestNodeWithPathTime:`](/Core/GlyphsCore/GSPath/nearestNodeWithPathTime:) — Returns the on-curve node nearest a path time.

