Math387.LimitRange / LimitRangef Method

Overload List

#SignatureDescription
1void LimitRange(Double Low, ref Double X, Double High)Limit the range X.
2void LimitRange(Int32 Low, ref Int32 X, Int32 High)Limit the range X.
3void LimitRangef(Single Low, ref Single X, Single High)

Overload 1: void LimitRange(Double Low, ref Double X, Double High)

Limit the range X.

#NameDescription
1LowLower bound in [Low,High].
2HighUpper bound in [Low,High].
3XModify x to lie within closed interval [Low,High].

Result: stored in self (calling object)

Remarks:

Change X to stay within [Low,High] closed interval.

Overload 2: void LimitRange(Int32 Low, ref Int32 X, Int32 High)

Limit the range X.

#NameTypeDescription
1LowInt32
2XInt32 (ref)output
3HighInt32

Result: stored in self (calling object)

Remarks:

Change X to stay within [Low,High] range. In this case the parameters are integers.

See Also: Math387.EnsureRange, Math387.CheckRange

Overload 3: void LimitRangef(Single Low, ref Single X, Single High)

#NameTypeDescription
1LowSinglescalar
2XSingle (ref)
3HighSinglescalar

Result: stored in self (calling object)