Math387.Max / Maxf Method

Overload List

#SignatureDescription
1TCplx Max(TCplx X, TCplx Y)Maximum of two numbers.
2TSCplx Max(TSCplx X, TSCplx Y)
3Double Max(Double X, Double Y)Maximum of two real numbers X and Y.
4Double Max(Double X, Int32 Y)
5Double Max(Int32 X, Double Y)Mixed integer/double Max/Min.
6Int32 Max(Int32 X, Int32 Y)Maximum of two integer numbers X and Y.
7Int64 Max(Int32 X, Int64 Y)
8Int64 Max(Int64 X, Int32 Y)Mixed 64/32-bit integer Max/Min.
9Int64 Max(Int64 X, Int64 Y)Maximum of two 64bit integer numbers X and Y.
10Single Max(Single X, Single Y)
11Single Maxf(Single X, Single Y)

Overload 1: TCplx Max(TCplx X, TCplx Y)

Maximum of two numbers.

#NameTypeDescription
1XTCplxscalar
2YTCplxscalar

Returns: TCplx (complex) - the maximum 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: TSCplx Max(TSCplx X, TSCplx Y)

#NameTypeDescription
1XTSCplxscalar
2YTSCplxscalar

Returns: TSCplx

Overload 3: Double Max(Double X, Double Y)

Maximum of two real numbers X and Y.

#NameTypeDescription
1XDoublescalar
2YDoublescalar

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

See Also: Math387.Min

Overload 4: Double Max(Double X, Int32 Y)

#NameTypeDescription
1XDoublescalar
2YInt32

Returns: Double

Overload 5: Double Max(Int32 X, Double Y)

Mixed integer/double Max/Min.

#NameTypeDescription
1XInt32
2YDoublescalar

Returns: Double

Remarks:

Delphi promotes the Integer arg to double, but the emitted C++ sees Max(int, double) as AMBIGUOUS between the Integer and double overloads (neither is an exact match). These exact mixed overloads resolve it; in Delphi and C# an exact match wins over the promotion, so no existing call changes.

Overload 6: Int32 Max(Int32 X, Int32 Y)

Maximum of two integer numbers X and Y.

#NameTypeDescription
1XInt32
2YInt32

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

See Also: Math387.Min

Overload 7: Int64 Max(Int32 X, Int64 Y)

#NameTypeDescription
1XInt32
2YInt64

Returns: Int64

Overload 8: Int64 Max(Int64 X, Int32 Y)

Mixed 64/32-bit integer Max/Min.

#NameTypeDescription
1XInt64
2YInt32

Returns: Int64

Remarks:

Delphi auto-promotes the 32-bit arg to Int64, but the emitted C++ would see Max(long long, int) as AMBIGUOUS between the int and Int64 overloads. These exact overloads resolve it; in Delphi and C# an exact match wins over the promotion, so no existing call changes.

Overload 9: Int64 Max(Int64 X, Int64 Y)

Maximum of two 64bit integer numbers X and Y.

#NameTypeDescription
1XInt64
2YInt64

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

See Also: Math387.Min

Overload 10: Single Max(Single X, Single Y)

#NameTypeDescription
1XSinglescalar
2YSinglescalar

Returns: Single

Overload 11: Single Maxf(Single X, Single Y)

#NameTypeDescription
1XSinglescalar
2YSinglescalar

Returns: Single