I'm actually working on an engine and came across a question I cannot answer.
Who do you think should check if the values are correct?
Lets take an example. Suppose we have a function like this:
void Rotate(float _fAngle);which obviously rotates something, doesn't matter what.
- Should it be the engine who should checks if the angle is between [-360,360], assert, compute the correct angle, do nothing?
- Should it be the guy using the engine who should check the angles before calling the Rotate function?
- Or perhaps both should check?
In my opinion the engine shouldn't be responsible for this simply because it would mean giving it too much responsibilities.
On the other hand, I've been a young developer and know that people don't always check theirs values before calling a method.
Let me know what you think.











