planck-js
Version:
2D JavaScript/TypeScript physics engine for cross-platform HTML5 game development
22 lines (11 loc) • 446 B
Markdown
# Function: clipSegmentToLine()
> **clipSegmentToLine**(`vOut`, `vIn`, `normal`, `offset`, `vertexIndexA`): `number`
Clipping for contact manifolds. Sutherland-Hodgman clipping.
## Parameters
• **vOut**: [`ClipVertex`](/api/classes/ClipVertex)[]
• **vIn**: [`ClipVertex`](/api/classes/ClipVertex)[]
• **normal**: [`Vec2Value`](/api/interfaces/Vec2Value)
• **offset**: `number`
• **vertexIndexA**: `number`
## Returns
`number`