aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-12-08 12:58:44 -0500
committersotech117 <michael_foiani@brown.edu>2023-12-08 12:58:44 -0500
commit9c5976ed413561467d9f73d1f42a2104bfc05195 (patch)
tree8e8d3ae7d428442b8372ddd2f16d9ab70697b135 /src
parent0685421a59c080aca14ee1d95b76bfee89083d88 (diff)
fix error cases
Diffstat (limited to 'src')
-rw-r--r--src/4dvecops/vec4operations.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/4dvecops/vec4operations.cpp b/src/4dvecops/vec4operations.cpp
index 58d87e6..1ffe673 100644
--- a/src/4dvecops/vec4operations.cpp
+++ b/src/4dvecops/vec4operations.cpp
@@ -44,14 +44,14 @@ glm::mat4 getViewMatrix4(
// calculate e2 basis vector, from the combinatory cross of up and over with e3
glm::vec4 e2 = cross4(upVector, lookVector, e3);
e2 = glm::normalize(e2);
- if (glm::distance(e2, glm::vec4{0, 0, 0, 1}) < 0.0001f) {
+ if (glm::distance(e2, glm::vec4{0, 0, 0, 0}) < 0.0001f) {
throw std::runtime_error("invalid up vector");
}
// calculate e1 basis vector, from the cross of only the over vector
glm::vec4 e1 = cross4(lookVector, e3, e2);
e1 = glm::normalize(e1);
- if (glm::distance(e1, glm::vec4{0, 0, 0, 1}) < 0.0001f) {
+ if (glm::distance(e1, glm::vec4{0, 0, 0, 0}) < 0.0001f) {
throw std::runtime_error("invalid over vector");
}