diff options
| author | Rémi Verschelde | 2017-03-24 22:51:27 +0100 |
|---|---|---|
| committer | GitHub | 2017-03-24 22:51:27 +0100 |
| commit | beba97c0c34bd4e88d8a1e34d26dad6c2340cc6e (patch) | |
| tree | a6f0a45dd345fbd2816cf1b969b8de0b9b356e39 /core/math/matrix3.cpp | |
| parent | fb46323022222ab52ab357508a4e96e619baa599 (diff) | |
| parent | 6bb9b58b09aee7fc543c03844ce51b62c838dadd (diff) | |
| download | godot-beba97c0c34bd4e88d8a1e34d26dad6c2340cc6e.tar.gz godot-beba97c0c34bd4e88d8a1e34d26dad6c2340cc6e.tar.zst godot-beba97c0c34bd4e88d8a1e34d26dad6c2340cc6e.zip | |
Diffstat (limited to 'core/math/matrix3.cpp')
| -rw-r--r-- | core/math/matrix3.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/math/matrix3.cpp b/core/math/matrix3.cpp index 98cab39ba..b31df2fad 100644 --- a/core/math/matrix3.cpp +++ b/core/math/matrix3.cpp @@ -575,6 +575,8 @@ Basis::Basis(const Quat &p_quat) { Basis::Basis(const Vector3 &p_axis, real_t p_phi) { // Rotation matrix from axis and angle, see https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle + ERR_FAIL_COND(p_axis.is_normalized() == false); + Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z); real_t cosine = Math::cos(p_phi); |
