adbrown85/glycerin — Issue #1: Add 3 and 4 component vector implementations
Author: adbrown85
Created: 2012-02-08 02:29:23+00:00
State: open

Since OpenGL no longer has math built in, we need to have some vector implementations. There should at least be three and four component versions.

It would be nice to have them match the vectors in GLSL as much as possible. Therefore *Vec3* and *Vec4* seem to make sense for the names. I'm not sure if they should be capitalized or not though? Also, to make things easy for now we won't worry about doubles right now. If we think we really need doubles in the future we can make something like *Vec3d* or *Vec4d* or even go template-based.

I would like to see the implementations have all the usual vector functions as top-level methods.

- *cross*
- *dot*
- *length*
- *normalize*

It would also be nice to have some non-standard ones for convenience.

- *direction*
- *distance*