Math387::Max Function

Overload List

#SignatureDescription
1TCplx Max(const TCplx &X, const TCplx &Y);Maximum of two numbers.
2TSCplx Max(const TSCplx &X, const TSCplx &Y);
3double Max(double X, double Y);Maximum of two real numbers X and Y.
4int Max(int X, int Y);Maximum of two integer numbers X and Y.
5long long Max(long long X, long long Y);Maximum of two 64bit integer numbers X and Y.
6long long Max(long long X, int Y);Mixed 64/32-bit integer Max/Min.
7long long Max(int X, long long Y);
8double Max(int X, double Y);Mixed integer/double Max/Min.
9double Max(double X, int Y);

Overload 1: TCplx Max(const TCplx &X, const TCplx &Y);

Maximum of two numbers.

#NameTypeDescription
1Xconst TCplx &
2Yconst TCplx &

Returns: 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.

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

Overload 2: TSCplx Max(const TSCplx &X, const TSCplx &Y);

#NameTypeDescription
1Xconst TSCplx &
2Yconst TSCplx &
Declared in Dew::Math::Units::Math387 · Dew.Math/Units.Math387.h · Cross-compiler

Overload 3: double Max(double X, double Y);

Maximum of two real numbers X and Y.

#NameTypeDescription
1Xdouble
2Ydouble

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

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

Overload 4: int Max(int X, int Y);

Maximum of two integer numbers X and Y.

#NameTypeDescription
1Xint
2Yint

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

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

Overload 5: long long Max(long long X, long long Y);

Maximum of two 64bit integer numbers X and Y.

#NameTypeDescription
1Xlong long
2Ylong long

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

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

Overload 6: long long Max(long long X, int Y);

Mixed 64/32-bit integer Max/Min.

#NameTypeDescription
1Xlong long
2Yint
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.

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

Overload 7: long long Max(int X, long long Y);

#NameTypeDescription
1Xint
2Ylong long
Declared in Dew::Math::Units::Math387 · Dew.Math/Units.Math387.h · Cross-compiler

Overload 8: double Max(int X, double Y);

Mixed integer/double Max/Min.

#NameTypeDescription
1Xint
2Ydouble
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.

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

Overload 9: double Max(double X, int Y);

#NameTypeDescription
1Xdouble
2Yint
Declared in Dew::Math::Units::Math387 · Dew.Math/Units.Math387.h · Cross-compiler