From f8de91ae41929286b1cf43c72093e5c996b1f949 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 18 Sep 2005 19:19:36 +0000 Subject: Added documentation --- vector.mod/doc/commands.html | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 vector.mod/doc/commands.html (limited to 'vector.mod/doc') diff --git a/vector.mod/doc/commands.html b/vector.mod/doc/commands.html new file mode 100644 index 0000000..4cb9c08 --- /dev/null +++ b/vector.mod/doc/commands.html @@ -0,0 +1,56 @@ + + +BlitzMax Module Reference + + + +

Type Reference

+

+
Type TVector Implements a 3D vector. Can be used as a 2D vector by ignoring Z.

+
Field x:Float The X component of the vector.


+

+
Field y:Float The Y component of the vector.


+

+
Field z:Float The Z component of the vector.


+

+
Method IsNull:Int() Is the vector null.

Returns: True if the vector is null (all components zero), False otherwise.



+

+
Method Length:Float() The length of the vector.

Returns: The length of the vector.



+

+
Method Normalise() Normalise the vector so its length is 1.


+

+
Method SetLength( sc:Float ) Set the vector so its length is sc.


+

+
Method AddScalar( sc:Float ) Adds sc to all components.


+

+
Method Minus() Reverse the direction of the vector.


+

+
Method Scale( sc:Float ) Scale all components by sc.


+

+
Method Add( v:TVector ) Add another vector to this vector.


+

+
Method Subtract( v:TVector ) Subtract another vector from this vector.


+

+
Method ScaleVector( v:TVector ) Scale this vector by another vector.


+

+
Method InverseScaleVector( v:TVector ) Inverse scale this vector by another vector.


+

+
Method Cross:TVector( v:TVector ) Calculate the cross product of this vector with another.

Returns: A new TVector holding the cross product.



+

+
Method Dot:Float( v:TVector ) Calculate the dot product of this vector with another.

Returns: The dot product.



+

+
Function Create:TVector( dx:Float=0.0, dy:Float=0.0, dz:Float=0.0 ) Create a vector.

Returns: The created vector.

dx, dy and dz are the initial component values.



+

+

Module Information

+ + + + + + + + + +
Framework Simple Vector class
Copyright Public Domain
Author Ian Cowburn
Version $Revision$
+ + -- cgit v1.2.3