diff options
author | Hubert Jarosz <marqin.pl@gmail.com> | 2016-03-09 00:00:52 +0100 |
---|---|---|
committer | Hubert Jarosz <marqin.pl@gmail.com> | 2016-03-09 00:00:52 +0100 |
commit | 4a4f2479146aa33e235ed57cde311efda68d3c8f (patch) | |
tree | cf91f2869ff8f058c6682569fb31e22e5ee736ad /core/math/quat.cpp | |
parent | 1dad6eca812e5c2e313b54265114de8a1d73d999 (diff) | |
download | redot-engine-4a4f2479146aa33e235ed57cde311efda68d3c8f.tar.gz |
remove trailing whitespace
Diffstat (limited to 'core/math/quat.cpp')
-rw-r--r-- | core/math/quat.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/math/quat.cpp b/core/math/quat.cpp index ebc5ec4e65..c6c12129b3 100644 --- a/core/math/quat.cpp +++ b/core/math/quat.cpp @@ -30,9 +30,9 @@ #include "print_string.h" void Quat::set_euler(const Vector3& p_euler) { - real_t half_yaw = p_euler.x * 0.5; - real_t half_pitch = p_euler.y * 0.5; - real_t half_roll = p_euler.z * 0.5; + real_t half_yaw = p_euler.x * 0.5; + real_t half_pitch = p_euler.y * 0.5; + real_t half_roll = p_euler.z * 0.5; real_t cos_yaw = Math::cos(half_yaw); real_t sin_yaw = Math::sin(half_yaw); real_t cos_pitch = Math::cos(half_pitch); @@ -75,7 +75,7 @@ void Quat::normalize() { Quat Quat::normalized() const { return *this / length(); -} +} Quat Quat::inverse() const { return Quat( -x, -y, -z, w ); @@ -252,7 +252,7 @@ Quat Quat::cubic_slerp(const Quat& q, const Quat& prep, const Quat& postq,const Quat::operator String() const { - return String::num(x)+","+String::num(y)+","+ String::num(z)+","+ String::num(w); + return String::num(x)+","+String::num(y)+","+ String::num(z)+","+ String::num(w); } Quat::Quat(const Vector3& axis, const real_t& angle) { @@ -261,7 +261,7 @@ Quat::Quat(const Vector3& axis, const real_t& angle) { set(0,0,0,0); else { real_t s = Math::sin(-angle * 0.5) / d; - set(axis.x * s, axis.y * s, axis.z * s, + set(axis.x * s, axis.y * s, axis.z * s, Math::cos(-angle * 0.5)); } } |