Clamp rotation to even segments.

function snapAngle(r: number, segments: number): number

Parameters

NameDescription

r

number

The rotation in radians.

segments

number

The number of segments.

Returns

number
Prev
SIN
Next
stopEventPropagation