correctFraction MethodStatic

Correct fraction to be within [0,1].

  • If fraction is in [0,1] return it unchanged.
  • If fraction is less than 0 use extendParam to decide whether to return it unchanged, or to return 0.
  • If fraction is greater than 1 use extendParam to decide whether to return it unchanged, or to return 1.

correctFraction(extendParam: VariantCurveExtendParameter, fraction: number): number

Parameter Type Description
extendParam VariantCurveExtendParameter  
fraction number  

Returns - number

Defined in

Last Updated: 14 November, 2024