Browse Source

* avoid unneeded widening of expressions due to constants defaulting to extended

florian 2 years ago
parent
commit
f8f824aa8d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/objpas/math.pp

+ 3 - 3
rtl/objpas/math.pp

@@ -2342,9 +2342,9 @@ end;
 {$endif FPC_HAS_TYPE_DOUBLE}
 {$endif FPC_HAS_TYPE_DOUBLE}
 
 
 Const
 Const
-  EZeroResolution = 1E-16;
-  DZeroResolution = 1E-12;
-  SZeroResolution = 1E-4;
+  EZeroResolution = Extended(1E-16);
+  DZeroResolution = Double(1E-12);
+  SZeroResolution = Single(1E-4);
 
 
 
 
 function IsZero(const A: Single; Epsilon: Single): Boolean;
 function IsZero(const A: Single; Epsilon: Single): Boolean;