diff options
| author | Rider Linden <rider@lindenlab.com> | 2025-08-23 10:27:46 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2025-08-23 10:27:46 -0700 |
| commit | 375158eb6450a0291ec1a0f55714fbf19a8287eb (patch) | |
| tree | a3fa4bd843f919575aaddf0928eff38bae7d7b04 /indra/llmath/v2math.cpp | |
| parent | 96023976f5af0b9af8e8d066d9ad4eea213f53ee (diff) | |
| parent | 37a04baf104aa394615d8e8286522988ba56c09d (diff) | |
Merge tag 'Second_Life_Release#37a04baf-2025.06' into project/lua_editor
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; |
