Skip to content

Documentation / @ripl/terminal / normalizeEllipseSweep

Function: normalizeEllipseSweep() ​

normalizeEllipseSweep(startAngle, endAngle, counterclockwise): number

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

Resolves an ellipse's signed sweep. A full turn is reported as a whole turn regardless of direction, matching how flattenEllipse closes the curve implicitly.

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.