angleToSignedPeriodicFraction Method

Return the fractionalized position of the given angle (as Angle) computed with consideration of 2PI period and with consideration of angle sweep direction (CW or CCW).

  • the start angle is at fraction 0
  • the end angle is at fraction 1
  • interior angles are between 0 and 1
  • negative fraction for angles "before" the start angle
  • fraction larger than one for angles "after" the end angle
  • allows period shift

angleToSignedPeriodicFraction(theta: Angle, zeroSweepDefault: number = 0.0, selector: ExteriorFractionSelector = ExteriorFractionSelector.SameSign): number

@returns fraction, or zeroSweepDefault if this sweep is empty.

Parameter Type Description
theta Angle input angle
zeroSweepDefault number return value when this sweep is empty (default 0)
selector ExteriorFractionSelector how to handle an angle outside of the sweep. Default value is
SameSign, to request a fraction with the same sign
as the fraction returned by angleToUnboundedFraction(theta).

Returns - number

fraction, or zeroSweepDefault if this sweep is empty.

Defined in

Last Updated: 28 October, 2026