OpenArena / engine

OpenArena modifications to the ioquake3 engine
http://openarena.ws
GNU General Public License v2.0
211 stars 50 forks source link

My attempt to improve RotatePointAroundVector and VectorNormalize functions in q_math.c #45

Open suijingfeng opened 6 years ago

suijingfeng commented 6 years ago

1) if the direction Vector given isn't normalized, function PointRotateAroundVector get wrongs results. 2) Apparently, PointRotateAroundVector function need more computions than PointRotateAroundVector I write. 3) Q_rsqrt , Q_fabs not necessarily faster than 1.0f /sqrtf() and fabs() that std c lib provide.

https://gist.github.com/suijingfeng/92e510aafe0e0246b3b4648c2c5eac21