JamesLongman / Squad-Mortar-Calculator-IOS

IOS App: Mortar calculator for the video game Squad
https://itunes.apple.com/app/id1352781413
MIT License
3 stars 0 forks source link

Barrage bug #21

Closed JamesLongman closed 6 years ago

JamesLongman commented 6 years ago

Not really sure exactly what the bug is but at greater radii the target seems to fluctuate wildly to the point where the azumath can do full 360s. If I had to guess I'd say the calculation for the range of y positions is incorrect after the x is chosen.

JamesLongman commented 6 years ago

The bug was caused by an error in the calculation of the Y tolerance once the X coordinate for the barrage point had been calculated. The Y Tolerance is calculated using Pythagorus and the error was the result value was not square rooted. This resulted in huge Y tolerances particularly noticeable at larger barrage radii