Ver Fonte

Merge pull request #178 from HurryStarfish/patch-6

Fix and docs adjustment for IsNan and IsInf
Brucey há 5 anos atrás
pai
commit
dcc35dbcf8
3 ficheiros alterados com 4 adições e 4 exclusões
  1. 1 1
      math.mod/doc/isinf.bmx
  2. 1 1
      math.mod/doc/isnan.bmx
  3. 2 2
      math.mod/math.bmx

+ 1 - 1
math.mod/doc/isinf.bmx

@@ -1,7 +1,7 @@
 SuperStrict
 
 For Local f:Float=-0.4 Until 0.4 Step 0.2
-    If IsInf(1.0 / f) = True Then
+    If IsInf(1.0 / f) Then
        Print "Divide by Zero"
     Else
        Print "inverse of "+f+" = "+String(1.0/f)

+ 1 - 1
math.mod/doc/isnan.bmx

@@ -1,7 +1,7 @@
 SuperStrict
 
 For Local f:Float=-0.4 Until 0.4 Step 0.2
-    If IsNan(Sqr(f)) = True Then
+    If IsNan(Sqr(f)) Then
        Print "Square Root of "+f+" is not a real number"
     Else
        Print "Square Root of  "+f+" = "+Sqr(f)

+ 2 - 2
math.mod/math.bmx

@@ -30,13 +30,13 @@ Rem
 bbdoc: Check if a value is NAN
 returns: True if @x is 'not a number' (eg: Sqr(-1))
 End Rem
-Function IsNan( x:Double )="int bbIsNan(double)!"
+Function IsNan:Int( x:Double )="int bbIsNan(double)!"
 
 Rem
 bbdoc: Check if a value is infinite (eg: 1.0/0.0)
 returns: True if @x is infinite
 End Rem
-Function IsInf( x:Double )="int bbIsInf(double)!"
+Function IsInf:Int( x:Double )="int bbIsInf(double)!"
 
 Rem
 bbdoc: Square root of @x