Can anyone tell me why:
Note: The blank spaces are + signs, and for some reason aren't showing up...
glVertex2d(((box->mX*pMatrix[0])/2.41421 - 0.5), ((box->mY*pMatrix[5])/2.41421 - 0.5));
glVertex2d(((box->mX*pMatrix[0])/2.41421 + 0.5), ((box->mY*pMatrix[5])/2.41421 - 0.5));
glVertex2d(((box->mX*pMatrix[0])/2.41421 + 0.5), ((box->mY*pMatrix[5])/2.41421 + 0.5));
glVertex2d(((box->mX*pMatrix[0])/2.41421 - 0.5), ((box->mY*pMatrix[5])/2.41421 + 0.5));
Gives me the desired result, while the following doesnt? Especially since pMatrix[0] AND pMatrix[5] are both == 2.41421? In theory they should cancel eachother out no matter what, but the one above is actually doing what I want it to do which is nice (I just wish I knew why).
glVertex2d(((box->mX*pMatrix[0])/pMatrix[0] - 0.5), ((box->mY*pMatrix[5])/pMatrix[5] - 0.5));
glVertex2d(((box->mX*pMatrix[0])/pMatrix[0] + 0.5), ((box->mY*pMatrix[5])/pMatrix[5] - 0.5));
glVertex2d(((box->mX*pMatrix[0])/pMatrix[0] + 0.5), ((box->mY*pMatrix[5])/pMatrix[5] + 0.5));
glVertex2d(((box->mX*pMatrix[0])/pMatrix[0] - 0.5), ((box->mY*pMatrix[5])/pMatrix[5] + 0.5));
Thanks.
AfroFire | Brin"The only thing that interferes with my learning is my education."-Albert Einstein