Math387.EnsureRange / EnsureRangef Method

Overload List

#SignatureDescription
1function EnsureRange(const Low: Double; const X: Double; const High: Double): Double;Limits the value.
2function EnsureRange(const Low: Integer; const X: Integer; const High: Integer): Integer;Limits the value.
3function EnsureRange(const Low: Int64; const X: Int64; const High: Int64): Int64;
4function EnsureRangef(const Low: Single; const X: Single; const High: Single): Single;

Overload 1: function EnsureRange(const Low: Double; const X: Double; const High: Double): Double;

Limits the value.

#NameTypeDescription
1LowDouble
2XDouble
3HighDouble

Returns: Double - Low if X is smaller then Low and High if X is bigger then High.

Overload 2: function EnsureRange(const Low: Integer; const X: Integer; const High: Integer): Integer;

Limits the value.

#NameTypeDescription
1LowInteger
2XInteger
3HighInteger

Returns: Int32

Remarks:

Parameters can be integers.

Overload 3: function EnsureRange(const Low: Int64; const X: Int64; const High: Int64): Int64;

#NameTypeDescription
1LowInt64
2XInt64
3HighInt64

Returns: Int64

Overload 4: function EnsureRangef(const Low: Single; const X: Single; const High: Single): Single;

#NameTypeDescription
1LowSingle
2XSingle
3HighSingle

Returns: Single