Page 1 of 1

math formula problem

Posted: Fri Nov 21, 2003 1:10 am
by deras
i fixed the problem... thanks.

Posted: Fri Nov 21, 2003 8:29 am
by Johnm
First thing you need to do is straighten this out:
$distance=sqrt($level1*$level1+$level2*$level2-2*$level1*$level2*cos($enclosed_radians));
for example:
(2 * 2 + 3 * 3 - 2 * 2 * 3 ) = 114 is not the same as
(((2 * 2) + ((3 * 3) - 2)) * (2 * 3)) = 66 is not the same as
(((2 * 2) + 3) * (3 - 2) * (2 * 3)) = 42 and so on...


John M