Quote:
Originally Posted by meak1
...
And urs not Correct =P
--> return (int)((oHeight)pHeight)(X-262143,Y-262143)*10; <-- Correct
|
Still not correct ^^
return (int)(((oHeight)pHeight)(X-262144,262144)*10);
except for the 262143/262144 thingy, I forgot to include the () around the *10. Without them the z value will be rounded down BEFORE it is multiplied by 10.
It can be that that you also need to add 0.5 to the z value before you round it down, but let's face it.. a difference of max 1 (of even 10) is not really noticable :P Nevertheless, I will change the formula in the opening post to correct it.