diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-03-25 03:06:07 +0900 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-03-25 03:06:07 +0900 |
| commit | d7f9a74f75ba0ce2167fa0e529a009becdcee7e3 (patch) | |
| tree | 44ca81f0b389379e508fac54e4c6a08c28ad93b1 /src/GameLoop.cpp | |
| parent | 107857d68babcbe01b45c6a8ba9c65b5c8df8b6f (diff) | |
| download | blackshades-d7f9a74f75ba0ce2167fa0e529a009becdcee7e3.tar.gz | |
Convert a few linear algebra functions to Zig
Diffstat (limited to 'src/GameLoop.cpp')
| -rw-r--r-- | src/GameLoop.cpp | 2 |
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; |
