owmii / Powah

Discord:
https://discord.gg/A8TP9JY
GNU Lesser General Public License v3.0
28 stars 22 forks source link

Fix #136 Energizing Rod beam render #151

Closed BlueAgent closed 3 years ago

BlueAgent commented 3 years ago

Fix #136 by clamping the y component of the normalized vector between -1.0 and 1.0 for acos. The reason why this is needed is normalize sometimes results in a vector of length > 1 due to the nature of floating point arithmetic, but also not help that the normalize implementation casts sqrt to a float then back to a double. Which when along the y axis breaks acos because it expects a number [-1.0,1.0].

Fixed Energizing Beams top-down Fixed Energizing Beams all around

owmii commented 3 years ago

Thank you!!