Math387.Min / Minf Method

Overload List

#SignatureDescription
1function Min(const X: TCplx; const Y: TCplx): TCplx;Minimum of two numbers.
2function Min(const X: TSCplx; const Y: TSCplx): TSCplx;
3function Min(X: Double; Y: Double): Double;Minimum of two real numbers X and Y.
4function Min(X: Double; Y: Integer): Double;
5function Min(X: Integer; Y: Double): Double;
6function Min(X: Integer; Y: Integer): Integer;Minimum of two integer numbers X and Y.
7function Min(X: Integer; Y: Int64): Int64;
8function Min(X: Int64; Y: Integer): Int64;
9function Min(X: Int64; Y: Int64): Int64;Minimum of two 64bit integer numbers X and Y.
10function Min(const X: Single; const Y: Single): Single;
11function Minf(X: Single; Y: Single): Single;

Overload 1: function Min(const X: TCplx; const Y: TCplx): TCplx;

Minimum of two numbers.

#NameTypeDescription
1XTCplx
2YTCplx

Returns: TCplx (complex) - the minimum of two complex numbers X and Y.

Remarks:

Complex numbers are first compared by the absolute value. If they are equal they are further compared by the unwrapped phase -PI,PI angle.

Overload 2: function Min(const X: TSCplx; const Y: TSCplx): TSCplx;

#NameTypeDescription
1XTSCplx
2YTSCplx

Returns: TSCplx

Overload 3: function Min(X: Double; Y: Double): Double;

Minimum of two real numbers X and Y.

#NameTypeDescription
1XDoublescalar
2YDoublescalar

Returns: Double - the minimum of two real numbers X and Y.

Overload 4: function Min(X: Double; Y: Integer): Double;

#NameTypeDescription
1XDoublescalar
2YInteger

Returns: Double

Overload 5: function Min(X: Integer; Y: Double): Double;

#NameTypeDescription
1XInteger
2YDoublescalar

Returns: Double

Overload 6: function Min(X: Integer; Y: Integer): Integer;

Minimum of two integer numbers X and Y.

#NameTypeDescription
1XInteger
2YInteger

Returns: Int32 - the minimum of two integer numbers X and Y.

Examples
Uses MtxVecInt;

procedure Example;
var a: TVecInt;
min, ind: integer;
begin
    CreateIt(a);
    try
        a.SetIt([1,2,3,4]);
        min := a.Min(ind); //min=1, ind = 0
    finally
        FreeIt(a);
    end
end;
See Also: Math387.Max

Overload 7: function Min(X: Integer; Y: Int64): Int64;

#NameTypeDescription
1XInteger
2YInt64

Returns: Int64

Overload 8: function Min(X: Int64; Y: Integer): Int64;

#NameTypeDescription
1XInt64
2YInteger

Returns: Int64

Overload 9: function Min(X: Int64; Y: Int64): Int64;

Minimum of two 64bit integer numbers X and Y.

#NameTypeDescription
1XInt64
2YInt64

Returns: Int64 - the minimum of two 64bit integer numbers X and Y.

See Also: Math387.Max

Overload 10: function Min(const X: Single; const Y: Single): Single;

#NameTypeDescription
1XSingle
2YSingle

Returns: Single

Overload 11: function Minf(X: Single; Y: Single): Single;

#NameTypeDescription
1XSinglescalar
2YSinglescalar

Returns: Single