dmsgl - Vectors
Vector class
- Arbitrary size; we'll use 2, 3, or 4 element vectors
- Can represent points or direction vectors
- Operators for vector-vector and vector-scalar math
- Functions:
- length(), lengthSquared()
- normalize()
- distance(otherVector), distanceSquared(otherVector)
- dot(otherVector)
- cross(otherVector)
- drawLine()
- Constants: X_Axis, Y_Axis, Z_Axis
next