Adds the getSignedAngleBetweenVectors function, which is like the existing getAngleBetweenVectors, but will returned a signed angle value, which helps to inform the full 360 angle, rather than the 'nearest 180'.

This commit is contained in:
Areloch 2017-02-19 23:00:54 -06:00
parent 5c8a82180b
commit c2c34cdd5d
3 changed files with 34 additions and 0 deletions

View file

@ -161,6 +161,11 @@ namespace MathUtils
///
F32 getAngleBetweenVectors(VectorF vecA, VectorF vecB);
/// Returns the angle between two given vectors, utilizing a normal vector to discertain the angle's sign
///
/// Angles is in RADIANS
///
F32 getSignedAngleBetweenVectors(VectorF vecA, VectorF vecB, VectorF norm);
/// Simple reflection equation - pass in a vector and a normal to reflect off of
inline Point3F reflect( Point3F &inVec, Point3F &norm )