diff options
| author | Ian C <ianc@noddybox.co.uk> | 2005-10-01 02:01:39 +0000 | 
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2005-10-01 02:01:39 +0000 | 
| commit | 1371436e7dc0d5a685804b17ff600dc5fb9e3a2a (patch) | |
| tree | acb9627795354d033af9fd39c0094a90b71579ce | |
| parent | b343aeaba65b6bafec58584510ea29ad65ac8737 (diff) | |
Changed to using doubles
| -rw-r--r-- | vector.mod/vector.bmx | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/vector.mod/vector.bmx b/vector.mod/vector.bmx index 67818fe..485fff1 100644 --- a/vector.mod/vector.bmx +++ b/vector.mod/vector.bmx @@ -21,15 +21,15 @@ Type TVector  	Rem  	bbdoc: The X component of the vector.  	EndRem -	Field x:Float +	Field x:Double  	Rem  	bbdoc: The Y component of the vector.  	EndRem -	Field y:Float +	Field y:Double  	Rem  	bbdoc: The Z component of the vector.  	EndRem -	Field z:Float +	Field z:Double  	Rem @@ -37,7 +37,7 @@ Type TVector  	returns: The created vector.  	about: @dx, @dy and @dz are the initial component values.  	EndRem -	Function Create:TVector(dx:Float=0.0, dy:Float=0.0, dz:Float=0.0) +	Function Create:TVector(dx:Double=0.0, dy:Double=0.0, dz:Double=0.0)  		Local o:TVector  		o=New TVector @@ -61,7 +61,7 @@ Type TVector  	bbdoc: The length of the vector.  	returns: The length of the vector.  	EndRem -	Method Length:Float() +	Method Length:Double()  		If (IsNull())  			Return 0  		Else @@ -73,7 +73,7 @@ Type TVector  	bbdoc: Normalise the vector so its length is 1.  	EndRem  	Method Normalise() -		Local l:Float=Length() +		Local l:Double=Length()  		If (l<>0)  			x:/l  			y:/l @@ -84,7 +84,7 @@ Type TVector  	Rem  	bbdoc: Set the vector so its length is @sc.  	EndRem -	Method SetLength(sc:Float) +	Method SetLength(sc:Double)  		Normalise()  		Scale(sc)  	End Method @@ -92,7 +92,7 @@ Type TVector  	Rem  	bbdoc: Adds @sc to all components.  	EndRem -	Method AddScalar(sc:Float) +	Method AddScalar(sc:Double)  		x:+sc  		y:+sc  		z:+sc @@ -110,7 +110,7 @@ Type TVector  	Rem  	bbdoc: Scale all components by @sc.  	EndRem -	Method Scale(sc:Float) +	Method Scale(sc:Double)  		x:*sc  		y:*sc  		z:*sc @@ -164,7 +164,7 @@ Type TVector  	bbdoc: Calculate the dot product of this vector with another.  	returns: The dot product.  	EndRem -	Method Dot:Float(v:TVector) +	Method Dot:Double(v:TVector)  		Return x*v.x + y*v.y + z*v.z  	End Method | 
