Ok, to be honest I wasn't sure where to put this, so I think this is the least wrong category, so anyway - here we go:
Hi there folks!
As you might guess I'm a newbie here, but don't get too hasty, as I am not a noob in Blitzmax :). Truth be told I've been poking around it for over a year, and at some point I got myself into making few modules, and now I want to present it to you - 2D Vector module.
Basically this little fella gives you the ability to work with 2D vectors quickly and easily. Specially designed Vector objects have most of the functions you will need (if not every). A little list:
-Every vector can be increased, decreased, multiplied and divided both by vector and independent numbers.
-Calculate Length and Angle
-Calculate the smaller angle between two vectors - one function retaining the sign, one being Absolute value
-Create normalized vectors (vectors of length 1)
-Quick and easy creation of clones of vectors
-Calculating the dot product of two vectors
-Rotating a vector by an angle
Also worth mentioning is that, just like in those built-in modules, every function can be accessed both through reference to existing instance "vector.function()" or by using a function "vectorAdd()" which add ability to work on and return vector clone instead.
Two examples might too be useful for better understanding the module.
You can download the module from here:
http://www.fileden.com/files/2007/10/7/1489821/Mauft-Vector.zip
For other modules made by me I can suggest my site:
http://mauft.com/blitzmax
(hopefully) Enjoy!
Hi there folks!
As you might guess I'm a newbie here, but don't get too hasty, as I am not a noob in Blitzmax :). Truth be told I've been poking around it for over a year, and at some point I got myself into making few modules, and now I want to present it to you - 2D Vector module.
Basically this little fella gives you the ability to work with 2D vectors quickly and easily. Specially designed Vector objects have most of the functions you will need (if not every). A little list:
-Every vector can be increased, decreased, multiplied and divided both by vector and independent numbers.
-Calculate Length and Angle
-Calculate the smaller angle between two vectors - one function retaining the sign, one being Absolute value
-Create normalized vectors (vectors of length 1)
-Quick and easy creation of clones of vectors
-Calculating the dot product of two vectors
-Rotating a vector by an angle
Also worth mentioning is that, just like in those built-in modules, every function can be accessed both through reference to existing instance "vector.function()" or by using a function "vectorAdd()" which add ability to work on and return vector clone instead.
Two examples might too be useful for better understanding the module.
You can download the module from here:
http://www.fileden.com/files/2007/10/7/1489821/Mauft-Vector.zip
For other modules made by me I can suggest my site:
http://mauft.com/blitzmax
(hopefully) Enjoy!