toji/gl-matrix — pull request #27 by sinisterchipmunk (2012-05-03 11:09:28+00:00)
Title: vec2 and mat2

Some operations to assist in 2D operations. I'm fairly new to 2D so hopefully this is of use. I'll understand if this pull request is rejected. :)

Adds the following, which function the same as their `vec3`/`mat4` counterparts, as well as corresponding tests:

vec2.create
vec2.add
vec2.subtract
vec2.multiply
vec2.divide
vec2.scale
vec2.dist
vec2.set
vec2.negate
vec2.normalize
vec2.cross
vec2.length
vec2.dot
vec2.direction
vec2.lerp
vec2.str
mat2.create
mat2.set
mat2.identity
mat2.transpose
mat2.determinant
mat2.inverse
mat2.rotate
mat2.scale
mat2.str
mat2.multiply
mat2.multiplyVec2
mat3.multiplyVec2