summaryrefslogtreecommitdiffstats
path: root/include/core/Vector3.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/Vector3.hpp')
-rw-r--r--include/core/Vector3.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/core/Vector3.hpp b/include/core/Vector3.hpp
index bbe8a95..0bfa2d9 100644
--- a/include/core/Vector3.hpp
+++ b/include/core/Vector3.hpp
@@ -251,8 +251,8 @@ struct Vector3 {
return v;
}
- inline Vector3 reflect(const Vector3 &by) const {
- return by - *this * this->dot(by) * 2.f;
+ inline Vector3 reflect(const Vector3 &p_normal) const {
+ return -(*this - p_normal * this->dot(p_normal) * 2.0);
}
inline Vector3 rotated(const Vector3 &axis, const real_t phi) const {