summaryrefslogtreecommitdiffhomepage
path: root/src/raymath.h
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2024-07-01 13:03:21 -0700
committerGitHub <[email protected]>2024-07-01 22:03:21 +0200
commit9d3bd43c6ed48e6276687ccec8b9caabbf8f73d3 (patch)
tree6ff20bde1e740c5fc47ff89b05f4e94a6f2fa4df /src/raymath.h
parentab20b2179f6d20c8a2e53761c57324cc987898d4 (diff)
downloadraylib-9d3bd43c6ed48e6276687ccec8b9caabbf8f73d3.tar.gz
raylib-9d3bd43c6ed48e6276687ccec8b9caabbf8f73d3.zip
[CORE] Fix MSVC warnings/errors and raymath.h in C++ (#4125)
* Update raylib_api.* by CI * Fix MSVC warnings. Make raymath.h work in C++ in MSVC * whitespace cleanup --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/raymath.h')
-rw-r--r--src/raymath.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/raymath.h b/src/raymath.h
index 0b695193..62d52f8f 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -2549,9 +2549,13 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
// Extract scale
const float det = a*A + b*B + c*C;
- float scalex = Vector3Length((Vector3){ a, b, c });
- float scaley = Vector3Length((Vector3){ d, e, f });
- float scalez = Vector3Length((Vector3){ g, h, i });
+ Vector3 abc = { a, b, c };
+ Vector3 def = { d, e, f };
+ Vector3 ghi = { g, h, i };
+
+ float scalex = Vector3Length(abc);
+ float scaley = Vector3Length(def);
+ float scalez = Vector3Length(ghi);
Vector3 s = { scalex, scaley, scalez };
if (det < 0) s = Vector3Negate(s);