cinder/Cinder — pull request #236 by paulhoux (2012-10-04 19:53:57+00:00)
Title: Fixed an issue with Quaternion::set(axis, angle) and added 2 methods to ...

...CinderMath.h.

The issue was related to supplying angles outside the range [0..TWO_PI], which somehow were not accepted properly. Try this repeatedly, and the quaternion gets stuck:

```cpp
float radians = mQuat.getRotation().getAngle();
radians += 0.05f;
mQuat.set( Vec3f::zAxis(), radians );
```

The new methods are mod(x,y), which always returns a positive value (not the same as fmod or modf), and wrap(x, min, max) which wraps around numbers within a range efficiently.