summaryrefslogtreecommitdiff
path: root/indra/llmath/v2math.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-08-29 12:48:44 -0400
committerGitHub <noreply@github.com>2025-08-29 12:48:44 -0400
commit842ac1e1503e41662c924289905b43b336b52a53 (patch)
treed8067fc99f6c699e3d15510c8521a32102f5cb30 /indra/llmath/v2math.cpp
parent28678996ceaea019aafaa26911a440769320c498 (diff)
parent787b63f4c29f6ef56f355ec80084458a1bbcfb35 (diff)
Merge pull request #4379 from secondlife/release/2025.06
Release/2025.06
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;