summaryrefslogtreecommitdiff
path: root/indra/llmath/v2math.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2025-08-22 17:12:03 -0700
committerCallum Prentice <callum@lindenlab.com>2025-08-22 17:12:03 -0700
commite935a8aebca4ae014b5f6b438612ac5674678fe6 (patch)
tree531498d040a62c01d444fe91eb99afb091c7fff4 /indra/llmath/v2math.cpp
parentbebd1b208e1b342fabf59844851124a91513e83b (diff)
parentcefee59b0e5fff683a50fe61633a9c14493d7145 (diff)
Merge branch 'develop' into callum/viewer-cef-2025-08
Diffstat (limited to 'indra/llmath/v2math.cpp')
-rw-r--r--indra/llmath/v2math.cpp7
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;