diff options
author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-08-14 11:17:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-14 11:17:35 +0300 |
commit | 6f072c2121fcb6f00ccc773d0ff4edc5cbfb013b (patch) | |
tree | 62c4967d6be428907691f133e794654b25c5d140 /indra/llmath/v2math.cpp | |
parent | 8145d99f80d55c4da88adb6909386bd5c25fd743 (diff) | |
parent | d859557c1865b0636ce2a407d2e7b814fbfc1eb6 (diff) |
Merge 2025.06 into develop
Merge 2025.06 into develop
Diffstat (limited to 'indra/llmath/v2math.cpp')
-rw-r--r-- | indra/llmath/v2math.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llmath/v2math.cpp b/indra/llmath/v2math.cpp index 59e6d947ca..175f08df88 100644 --- a/indra/llmath/v2math.cpp +++ b/indra/llmath/v2math.cpp @@ -66,6 +66,13 @@ F32 angle_between(const LLVector2& a, const LLVector2& b) return angle; } +F32 signed_angle_between(const LLVector2& a, const LLVector2& b) +{ + F32 angle = angle_between(a, b); + F32 rhombus_square = a[VX] * b[VY] - b[VX] * a[VY]; + return rhombus_square < 0 ? -angle : angle; +} + bool are_parallel(const LLVector2& a, const LLVector2& b, F32 epsilon) { LLVector2 an = a; |