And to make it even faster
Jump to navigation
Jump to search
Revision as of 23 September 2017 at 15:56.
The highlighted comment was created in this revision.
The highlighted comment was created in this revision.
double x = bulletSpeed; double a = -3.508129323E-5; double b = 2.460363294E-3; double c = -6.666318894E-2; double d = 8.545020365E-1; double e = -3.337830707; double angle = a * x * x * x * x + b * x * x * x + c * x * x + d * x + e; return Math.sin(angle) / (bulletSpeed / 8 - Math.cos(angle));
I know. But calculated numbers weren't exact and Wolfram Alpha's computation time exceeds.
Dsekercioglu (talk)
Precision is up to 9 numbers. I think that it is enough.
Dsekercioglu (talk)
Sorry, I didn't see that you changed the code. In my robot I did it like that but it is more understandable with Math.pow(x, y).
Dsekercioglu (talk)
Wow, I had no idea that the escape angle could be 15% bigger than traditional MEA calculation at the most common bulletspeed of 1.9 . . . Seems like my list of things to do for GresSuffurd to become top-10 again, gets bigger and bigger.
GrubbmGait (talk)