Skip to content

Documentation / @ripl/terminal / normalizeArcSweep

Function: normalizeArcSweep() ​

normalizeArcSweep(startAngle, endAngle, counterclockwise): number

Defined in: terminal/src/algorithms.ts:327

Resolves an arc's signed sweep, wrapping the end angle by a full turn when the requested direction contradicts the angles as given.

Parameters ​

ParameterTypeDescription
startAnglenumberAngle the sweep starts at, in radians.
endAnglenumberAngle the sweep ends at, in radians.
counterclockwisebooleanWhether the sweep runs counterclockwise.

Returns ​

number

The signed sweep, in radians.