Math387.LimitRange / LimitRangef Method

Overload List

#SignatureDescription
1procedure LimitRange(const Low: Double; var X: Double; const High: Double);Limit the range X.
2procedure LimitRange(const Low: Integer; var X: Integer; const High: Integer);Limit the range X.
3procedure LimitRangef(const Low: Single; var X: Single; const High: Single);

Overload 1: procedure LimitRange(const Low: Double; var X: Double; const High: Double);

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: procedure LimitRange(const Low: Integer; var X: Integer; const High: Integer);

Limit the range X.

#NameTypeDescription
1LowInteger
2XInteger
3HighInteger

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: procedure LimitRangef(const Low: Single; var X: Single; const High: Single);

#NameTypeDescription
1LowSingle
2XSingle
3HighSingle

Result: stored in self (calling object)