angleToSignedFraction Method
Return the fractionalized position of the given 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
.
angleToSignedFraction(theta: Angle, toNegativeFraction: booleanfalse, zeroSweepDefault: number0.0): number
@returns fraction, or zeroSweepDefault
if this sweep is empty
Parameter | Type | Description |
---|---|---|
theta | Angle | input angle |
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 angleToPositivePeriodicFraction. |
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 473
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.