about summary refs log tree commit diff
path: root/src/GameLoop.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-25 03:06:07 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-25 03:06:07 +0900
commitd7f9a74f75ba0ce2167fa0e529a009becdcee7e3 (patch)
tree44ca81f0b389379e508fac54e4c6a08c28ad93b1 /src/GameLoop.cpp
parent107857d68babcbe01b45c6a8ba9c65b5c8df8b6f (diff)
downloadblackshades-d7f9a74f75ba0ce2167fa0e529a009becdcee7e3.tar.gz
Convert a few linear algebra functions to Zig
Diffstat (limited to 'src/GameLoop.cpp')
-rw-r--r--src/GameLoop.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp
index 0cfe3ef..f9eefcc 100644
--- a/src/GameLoop.cpp
+++ b/src/GameLoop.cpp
@@ -141,7 +141,7 @@ void handleKey(Game* game, int key, int action, int mods)
 
 			XYZ towards = player.playercoords - game->bodycoords;
 			if (towards.x || towards.z) {
-				Normalise(&towards);
+				towards = normalize(towards);
 				camera.rotation = asin(towards.x) * 180.0f / M_PI;
 				if (towards.z > 0)
 					camera.rotation = 180 - camera.rotation;