dart-lang/dart-box2d — pull request #17 by laszlokorte (2013-07-05 11:09:57+00:00)
Title: use vector_math library instead of custom vector implementation.

As there is already a vector_math library it would be neat to reuse it instead of reimplementing the vector and matrix classes.

I added vector_math as dependency and removed the old Vector2, Matrix22 and Matrix33 classes as well as the MathBox.radToDegree and degreeToRad methods (they are also available in vector_math).

Some methods on Vector2 and Matrix22/33 are not included in the vector_math lib. I have changed them to be global functions prefixed with the classname of their previous classes:

void Vector2_crossNumAndVectorToOut(double s, Vector2 a, Vector2 out)
void Vector2_crossVectorAndNumToOut(Vector2 a, double s, Vector2 out)
void Vector2_minToOut(Vector2 a, Vector2 b, Vector2 out)
void Vector2_maxToOut(Vector2 a, Vector2 b, Vector2 out)
void Matrix2_mulTransMatrixAndVectorToOut(Matrix2 matrix, Vector2 vector, Vector2 out)
void Matrix2_mulMatrixAndVectorToOut(Matrix2 matrix, Vector2 vector, Vector2 out)
void Matrix2_solveToOut(Matrix2 a, Vector2 b, Vector2 out)
void Matrix3_solve22ToOut(Matrix3 a, Vector2 b, Vector2 out)
void Matrix3_solve33ToOut(Matrix3 a, Vector3 b, Vector3 out)
void Vector3_crossToOut(Vector3 a, Vector3 b, Vector3 out)