resolveRadiansToValidSweepFraction MethodStatic
Adjust a radians value to an angle sweep, extending beyond or clamping to [0,1] according to extendParam:
- If
radiansis within the sweep, convert it to a fraction of the sweep. - If
radiansis outside the sweep andextendParamdoes not allow extension at both ends, adjust the fraction:- fraction below 0 if
extendParamallows extension only at start - fraction above 1 if
extendParamallows extension only at end - fraction clamped to [0,1] if
extendParamdisallows extension at both ends
- fraction below 0 if
resolveRadiansToValidSweepFraction(extendParam: VariantCurveExtendParameter, radians: number, sweep: AngleSweep): { fraction: number, isValid: boolean }
@returns adjusted fraction of sweep, and a boolean indicating whether it is valid, i.e. whether radians lies in
the sweep extended per extendParam.
| Parameter | Type | Description |
|---|---|---|
| extendParam | VariantCurveExtendParameter | |
| radians | number | |
| sweep | AngleSweep |
Returns - { fraction: number, isValid: boolean }
adjusted fraction of sweep, and a boolean indicating whether it is valid, i.e. whether radians lies in
the sweep extended per extendParam.
Defined in
- curve/CurveExtendMode.ts Line 76
Last Updated: 30 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.