1
Graphics / Converting from Cartesian coordinate system to SFML.
« on: January 27, 2012, 02:16:09 am »
maybe i'm missing something, but I don't understand how ScreenCentre wouldn't cancel out.
dPos = dPos + ViewCentre + (ScreenCentre - ViewCentre);
i'm pretty sure that order of operation does not matter when all operations are addition and/or subtraction.
mathematically, the line above should simplify to:
dPos += ScreenCentre;
dPos = dPos + ViewCentre + (ScreenCentre - ViewCentre);
i'm pretty sure that order of operation does not matter when all operations are addition and/or subtraction.
mathematically, the line above should simplify to:
dPos += ScreenCentre;