mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 00:47:47 +02:00
* Add and use TValueSign
This commit is contained in:
parent
3447dcfaa6
commit
5ecacbb7a4
@ -57,13 +57,17 @@ function randg(mean,stddev : float) : float;
|
||||
function RandomRange(const aFrom, aTo: Integer): Integer;
|
||||
function RandomRange(const aFrom, aTo: NativeLargeInt): NativeLargeInt;
|
||||
|
||||
Type
|
||||
TValueSign = -1..1;
|
||||
|
||||
|
||||
const
|
||||
NegativeValue = -1;
|
||||
ZeroValue = 0;
|
||||
PositiveValue = 1;
|
||||
|
||||
function Sign(const AValue: Integer): Integer; external name 'Math.sign'; overload;
|
||||
function Sign(const AValue: Double): Double; external name 'Math.sign'; overload;
|
||||
function Sign(const AValue: Integer): TValueSign; external name 'Math.sign'; overload;
|
||||
function Sign(const AValue: Double): TValueSign; external name 'Math.sign'; overload;
|
||||
|
||||
function IsZero(const d: Double; Epsilon: Double): Boolean; overload;
|
||||
function IsZero(const d: Double): Boolean; overload;
|
||||
|
Loading…
Reference in New Issue
Block a user