From d7f9a74f75ba0ce2167fa0e529a009becdcee7e3 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sat, 25 Mar 2023 03:06:07 +0900 Subject: Convert a few linear algebra functions to Zig --- src/GameLoop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/GameLoop.cpp') 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; -- cgit 1.4.1