radiansToSignedFraction Method
Return the fractionalized position of the given radian angle with respect to this sweep.
- The start angle returns fraction 0
- The end angle returns fraction 1
- Interior angles (and their multiples of 2PI) return fractions in [0,1].
- Exterior angles return fractions outside [0,1] according to
toNegativeFraction
.
radiansToSignedFraction(radians: number, toNegativeFraction: booleanfalse, zeroSweepDefault: number0.0): number
@returns fraction, or zeroSweepDefault
if this sweep is empty
Parameter | Type | Description |
---|---|---|
radians | number | input angle (in radians) |
toNegativeFraction | boolean | convert an exterior angle to a negative number (true), or to a number greater than one (false, default). If false, this is just radiansToPositivePeriodicFraction. |
zeroSweepDefault | number | return value when this sweep is empty (default 0). |
Returns - number
fraction, or zeroSweepDefault
if this sweep is empty
Defined in
- geometry3d/AngleSweep.ts Line 458
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.