i have a ‘mouse reader’ class which can turn rotations into x,y,z. (It’s a kind of first person camera) But i don’t want the person to look directly at his axis, so i did this:
if (!(Altitude + MouseCoordChange[1] > 269) && !(Altitude + MouseCoordChange[1] < 91))
{
I couted the checking and it’s perfect, it prevents you from going too much up and down, but some times, it goes under 91 and 269, how is this possible?
Thank You
You’ve fallen foul of De Morgen’s Law
in other words:
!A && !B = !(A || B)
I suspect what you wanted was:
Or even clearer: