Public function

Clamp rotation to even segments.

Signature
function snapAngle(r: number, segments: number): number
Parameters
NameDescription

r

number

The rotation in radians.

segments

number

The number of segments.

Returns
number
Source

packages/editor/src/lib/primitives/utils.ts

SINSnapLine