mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
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:
parent
5c8a82180b
commit
c2c34cdd5d
3 changed files with 34 additions and 0 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue