Math387::LimitRange Function

Overload List

#SignatureDescription
1void LimitRange(const double Low, double &X, const double High);Limit the range X.
2void LimitRange(const int Low, int &X, const int High);Limit the range X.

Overload 1: void LimitRange(const double Low, double &X, const double High);

Limit the range X.

#NameTypeDescription
1Lowconst doubleLower bound in [Low,High].
2Xdouble &Modify x to lie within closed interval [Low,High].
3Highconst doubleUpper bound in [Low,High].
Remarks:

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

Declared in Dew::Math::Units::Math387 · Dew.Math/Units.Math387.h · Cross-compiler

Overload 2: void LimitRange(const int Low, int &X, const int High);

Limit the range X.

#NameTypeDescription
1Lowconst int
2Xint &
3Highconst int
Remarks:

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

See Also: Math387::EnsureRange, Math387::CheckRange
Declared in Dew::Math::Units::Math387 · Dew.Math/Units.Math387.h · Cross-compiler