System.Math.Sign
Delphi
function Sign(const AValue: Integer): TValueSign;
function Sign(const AValue: Int64): TValueSign;
function Sign(const AValue: Single): TValueSign;
function Sign(const AValue: Double): TValueSign;
function Sign(const AValue: Extended): TValueSign;
C++
extern DELPHI_PACKAGE TValueSign __fastcall Sign(const int AValue)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
Description
Indicates whether a numeric value is positive, negative, or zero.
Use Sign to test the sign of a numeric value. Sign returns one of the following constants defined for the TValueSign type:
ZeroValue
(0), ifAValue
is zero.PositiveValue
(1), ifAValue
is greater than zero.NegativeValue
(-1), ifAValue
is less than zero.