kronosaur / TranscendenceDev

Explore the farthest reaches of Human Space in this open-world space adventure.
https://transcendence.kronosaur.com
Other
31 stars 15 forks source link

Fix C3DConversion::CalcPolar returning incorrect position with positive Y values #88

Closed exinfinitum closed 2 years ago

exinfinitum commented 2 years ago

C3DConversion::CalcPolar seems to return different radii when vPos Y value is positive, than when it is negative. This fix does a simple fix by forcing the calculation to return the result for when Y is negative, but inverting the angle if Y is positive - which makes it return the correct radius and angle.

exinfinitum commented 2 years ago

https://github.com/kronosaur/TranscendenceDev/commit/7e616a7f44235f8c473e389c3ec255a8489942c3 resolves this problem. This change is no longer necessary.