mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 18:09:43 +02:00
* sign() extended and single
git-svn-id: trunk@5223 -
This commit is contained in:
parent
469ac311e0
commit
86a834d2df
@ -186,7 +186,13 @@ const
|
|||||||
|
|
||||||
function Sign(const AValue: Integer): TValueSign;inline;
|
function Sign(const AValue: Integer): TValueSign;inline;
|
||||||
function Sign(const AValue: Int64): TValueSign;inline;
|
function Sign(const AValue: Int64): TValueSign;inline;
|
||||||
|
{$ifdef FPC_HAS_TYPE_SINGLE}
|
||||||
|
function Sign(const AValue: Single): TValueSign;inline;
|
||||||
|
{$endif}
|
||||||
function Sign(const AValue: Double): TValueSign;inline;
|
function Sign(const AValue: Double): TValueSign;inline;
|
||||||
|
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
||||||
|
function Sign(const AValue: Extended): TValueSign;inline;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
function IsZero(const A: Single; Epsilon: Single): Boolean;
|
function IsZero(const A: Single; Epsilon: Single): Boolean;
|
||||||
function IsZero(const A: Single): Boolean;inline;
|
function IsZero(const A: Single): Boolean;inline;
|
||||||
@ -541,6 +547,20 @@ begin
|
|||||||
Result:=ZeroValue;
|
Result:=ZeroValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef FPC_HAS_TYPE_SINGLE}
|
||||||
|
function Sign(const AValue: Single): TValueSign;inline;
|
||||||
|
|
||||||
|
begin
|
||||||
|
If Avalue<0.0 then
|
||||||
|
Result:=NegativeValue
|
||||||
|
else If Avalue>0.0 then
|
||||||
|
Result:=PositiveValue
|
||||||
|
else
|
||||||
|
Result:=ZeroValue;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
function Sign(const AValue: Double): TValueSign;inline;
|
function Sign(const AValue: Double): TValueSign;inline;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -552,6 +572,18 @@ begin
|
|||||||
Result:=ZeroValue;
|
Result:=ZeroValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
||||||
|
function Sign(const AValue: Extended): TValueSign;inline;
|
||||||
|
|
||||||
|
begin
|
||||||
|
If Avalue<0.0 then
|
||||||
|
Result:=NegativeValue
|
||||||
|
else If Avalue>0.0 then
|
||||||
|
Result:=PositiveValue
|
||||||
|
else
|
||||||
|
Result:=ZeroValue;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
function degtorad(deg : float) : float;
|
function degtorad(deg : float) : float;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user