math2d
by Roaming Gamer
View and activate on the Corona Store
The math2d plugin provides a set of standard 2d vector math operations, including: addition, subtraction, difference, dot, cross, angle2Vector, vector2Angle, length, squared length, and normalize.
These functions are provided in flexible and fast versions.
Flexible: The flexible math2d functions detect the type of inputs you have used (scalars or objects) and return similar results unless told to return the ‘altRet’ value. (See examples in syntax reference).
Fast: The fast math2d functions ONLY take scalar values and have been optimized to execute individual 2d math calculations at the highest possible rate.