KaylaKaze wrote:Something's off in your calculations:

Code: Select all

`KaylaKaze:`

« math.sin(math.toRadians(45)) = math.sin(math.toRadians(45)) = 0.665148772988813401014167238056219011 »

KaylaKaze:

« math.cos(math.toRadians(45)) = math.cos(math.toRadians(45)) = 0.758912420807571160280436671609310105 »

Those should be equal (or reasonably close).

I only ran a couple of tests on each and see if they matched my calculator, but I'll double check this. At first glance, neither of those answers are correct:

toRadians = pi/180 * 45 = 0.78539816339744830961566084581988

cos(0.78539816339744830961566084581988) = 0.70710678118654752440084436210485

sin(0.78539816339744830961566084581988) = 0.70710678118654752440084436210485

on my calculator.

in MT:

toRadians = 0.78539816339744830961499999999999990

cos(0.78539816339744830961499999999999990) = 0.758912420807571160280436671609310105

cos(0.78539816339744830961566084581988) = 0.758912420807571160280436671609310105

sin(0.78539816339744830961499999999999990) = 0.665148772988813401014167238056219011

sin(0.78539816339744830961566084581988) = 0.665148772988813401014167238056219011

So it seems the cos and sin function are off... I left those alone from the original file, but I'll see if adding some more significance helps, but when I tested the values before it was correct within 20 places... but that was with integers and that may be the difference.

That is a pretty big diff... I'll try increasing the significance. I left the