diff options
| -rw-r--r-- | vector.mod/vector.bmx | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/vector.mod/vector.bmx b/vector.mod/vector.bmx index 264f300..f32035b 100644 --- a/vector.mod/vector.bmx +++ b/vector.mod/vector.bmx @@ -25,7 +25,7 @@ Type TVector  	'  	' Returns null for invalid parameters.  	' -	Function Create:TVector(dx:Float, dy:Float, dz:Float) +	Function Create:TVector(dx:Float=0.0, dy:Float=0.0, dz:Float=0.0)  		Local o:TVector  		o=New TVector @@ -64,6 +64,13 @@ Type TVector  		EndIf  	End Method +	' Set the vector to a length +	' +	Method SetLength(sc:Float) +		Normalise() +		Scale(sc) +	End Method +	  	' Add a scalar to the vector  	'  	Method AddScalar(sc:Float) | 
