System.Math.Sign

From RAD Studio API Documentation
Jump to: navigation, search

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), if AValue is zero.
  • PositiveValue (1), if AValue is greater than zero.
  • NegativeValue (-1), if AValue is less than zero.

See Also