Some useful mathematics.
Clamp function added.
Matrix and Quaternion prototypes a little refactoring.