Well, in the case of rotation specifically it doesn't matter since "out-of-range" angles will still work in all the trig functions in the rotation formula.
But to answer your question in general: where a function has constraints on its arguments, IMO it's appropriate for the function itself to check those constraints, as long as it is reasonable for it to do so (i.e. it has all the relevant information available, checking the constraints is not too expensive, etc).
More generally, the appropriate level and strategy of "defensive coding" really depends on what kind of code you're writing, and what the consequences of an undetected error are. To take two extreme examples: for high-performance math code, I'd do very little error checking, and limit it to debug builds, since checking errors can be a drag on performance and math functions generally don't cause anything bad to happen if you call them on bad input. Garbage in, garbage out, but it won't cause a crash or anything terrible. (An exception is if an error leads to creating NaNs, since those can infect all your data quite rapidly.) On the other hand, for a web service that needs to be running 24/7 I'd be meticulous about error checking, and go to great lengths to ensure the system can recover and continue to operate after an error (and that errors don't cause it to corrupt its data, etc.).