diff options
author | Elisey Puzko <puzko.e02@gmail.com> | 2018-02-23 11:11:49 +0100 |
---|---|---|
committer | Elisey Puzko <puzko.e02@gmail.com> | 2018-02-23 11:11:49 +0100 |
commit | 0bfe80ec281f856e99d158647436f3470b3013c7 (patch) | |
tree | 77e3ea028fac6b5096aa2debeb0990bacd7deb23 | |
parent | Some more tabs -> spaces conversions (diff) | |
download | AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.tar AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.tar.gz AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.tar.bz2 AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.tar.lz AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.tar.xz AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.tar.zst AltCraft-0bfe80ec281f856e99d158647436f3470b3013c7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/GameState.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GameState.cpp b/src/GameState.cpp index 4128fd6..9478085 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -594,11 +594,11 @@ BlockFacing detectHitFace(VectorF raycastHit, Vector selectedBlock) { static const auto vecRight = VectorF(1, 0, 0); static const auto vecForward = VectorF(0, 0, -1); - auto up = (vec.dot(vecUp))/(vec.GetLength()*vecUp.GetLength()); + auto up = vec.cosBetween(vecUp); auto down = -up; - auto right = (vec.dot(vecRight))/(vec.GetLength()*vecRight.GetLength()); + auto right = vec.cosBetween(vecRight); auto left = -right; - auto forward = (vec.dot(vecForward))/(vec.GetLength()*vecForward.GetLength()); + auto forward = vec.cosBetween(vecForward); auto backward = -forward; // TODO: create a min/max function for the variable number of arguments |