Skip to content

Documentation / @ripl/terminal / estimateArcSteps

Function: estimateArcSteps() ​

estimateArcSteps(radius, sweep): number

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

Estimates a reasonable number of line segments for an arc of the given raster-space radius.

Parameters ​

ParameterTypeDescription
radiusnumberThe arc's radius, in raster pixels.
sweepnumberThe angle the arc sweeps through, in radians.

Returns ​

number

The number of segments to sample the arc with.