Răsfoiți Sursa

Fixed compiler warnings.

woollybah 5 ani în urmă
părinte
comite
a015f4650c
3 a modificat fișierele cu 8 adăugiri și 5 ștergeri
  1. 2 0
      quaternion.mod/glue.h
  2. 2 0
      quaternion.mod/quaternion.bmx
  3. 4 5
      vector.mod/vector.bmx

+ 2 - 0
quaternion.mod/glue.h

@@ -0,0 +1,2 @@
+#include <math.h>
+

+ 2 - 0
quaternion.mod/quaternion.bmx

@@ -38,6 +38,8 @@ Import BRL.Math
 Import BRL.Matrix
 Import BRL.Matrix
 Import BRL.StringBuilder
 Import BRL.StringBuilder
 
 
+Import "glue.h"
+
 Rem
 Rem
 bbdoc: A Quaternion.
 bbdoc: A Quaternion.
 about: Quaternions are used to represent rotations.
 about: Quaternions are used to represent rotations.

+ 4 - 5
vector.mod/vector.bmx

@@ -140,7 +140,7 @@ Struct SVec2D
 		End If
 		End If
 
 
 		Local dot:Double = Clamp(Self.Dot(b) / d, -1, 1)
 		Local dot:Double = Clamp(Self.Dot(b) / d, -1, 1)
-		Return _acos(dot) * 57.295779513082320876798154814105:Double
+		Return _acos(dot)
 	End Method
 	End Method
 		
 		
 	Rem
 	Rem
@@ -559,7 +559,7 @@ Struct SVec2F
 		End If
 		End If
 
 
 		Local dot:Float = ClampF(Self.Dot(b) / d, -1, 1)
 		Local dot:Float = ClampF(Self.Dot(b) / d, -1, 1)
-		Return _acos(dot) * 57.295779513
+		Return _acos(dot)
 	End Method
 	End Method
 		
 		
 	Rem
 	Rem
@@ -985,7 +985,7 @@ Struct SVec2I
 		End If
 		End If
 
 
 		Local dot:Double = Clamp(Self.Dot(b) / d, -1, 1)
 		Local dot:Double = Clamp(Self.Dot(b) / d, -1, 1)
-		Return Int(_acos(dot) * 57.295779513082320876798154814105:Double)
+		Return Int(_acos(dot))
 	End Method
 	End Method
 		
 		
 	Rem
 	Rem
@@ -1377,7 +1377,6 @@ Function ClampI:Int(a:Int, mini:Int, maxi:Int)
 End Function
 End Function
 
 
 Extern
 Extern
-	Function _acos:Double(x:Double)="double acos(double)!"
-	Function _sin:Double(x:Double)="double sin(double)!"
+	Function _acos:Double(x:Double)="double bbACos(double)!"
 End Extern
 End Extern
 Public
 Public