This is just a small nicety to protect me from myself:
Because of the small values, passing integers to degreesToRadians() or radiansToDegrees() does not make much sense - but it’s an easy mistake to make. just write AffineTransform::rotation(degreesToRadians(180)) and you’re screwed. This can easily be addresses by adding static asserts to those functions:
static_assert(!std::is_integral<FloatType>::value, "angles cannot be integers.")
One could also use std::is_floating_point() but then the assert also fires in case someone comes along with his custom fixed point type.
PS.: It’s really nice to have those functions. The gems never stop surfacing!
Edit: changed “is_integer” to “is_integral”. There’s no std::is_integer.