# `GSPath unitVectorAtNodeAtIndex:direction:`

*Instance Method*

The tangent unit vector at a node index.

## Declaration

```objc
- (NSPoint) unitVectorAtNodeAtIndex:(NSInteger) nodeIdx direction:(int) direction;
```

```python
unitVectorAtNodeAtIndex_direction_(nodeIdx: int, direction: int) -> NSPoint
```

## Discussion

Nonnegative direction values use following nodes. Negative direction values use preceding nodes.

Returns a point whose x value is `NSNotFound` when no tangent can be determined.

## See Also

### Tangents

- [`GSPath tangentAngleAtNode:direction:`](/Core/GlyphsCore/GSPath/tangentAngleAtNode:direction:) — The tangent angle at a node.
- [`GSPath tangentAngleAtNodeAtIndex:direction:`](/Core/GlyphsCore/GSPath/tangentAngleAtNodeAtIndex:direction:) — The tangent angle at a node index.
- [`GSPath unitVectorAtNodeAtIndex:`](/Core/GlyphsCore/GSPath/unitVectorAtNodeAtIndex:) — The tangent unit vector at a node index.

