diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-04 20:43:34 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-04 20:43:34 +0100 |
commit | f10feabec49755d737a14f3cdb1452e6c585c60f (patch) | |
tree | 47e5443c50fc3107efbb1b98600a471b6b1c525d /core/math/quaternion.cpp | |
parent | 4320d53a2bec49a06e46ca02af77e8c145fc49d6 (diff) | |
parent | a497a5cb3e31f1d863ad70d80bc706474a29d8cc (diff) | |
download | redot-engine-f10feabec49755d737a14f3cdb1452e6c585c60f.tar.gz |
Merge pull request #88467 from AThousandShips/math_improve
[Core] Codestyle improvements to math types
Diffstat (limited to 'core/math/quaternion.cpp')
-rw-r--r-- | core/math/quaternion.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/math/quaternion.cpp b/core/math/quaternion.cpp index cbaaa1371a..08eac14b76 100644 --- a/core/math/quaternion.cpp +++ b/core/math/quaternion.cpp @@ -110,7 +110,7 @@ Quaternion Quaternion::exp() const { return Quaternion(src_v, theta); } -Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) const { +Quaternion Quaternion::slerp(const Quaternion &p_to, real_t p_weight) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG(!is_normalized(), Quaternion(), "The start quaternion " + operator String() + " must be normalized."); ERR_FAIL_COND_V_MSG(!p_to.is_normalized(), Quaternion(), "The end quaternion " + p_to.operator String() + " must be normalized."); @@ -151,7 +151,7 @@ Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) con scale0 * w + scale1 * to1.w); } -Quaternion Quaternion::slerpni(const Quaternion &p_to, const real_t &p_weight) const { +Quaternion Quaternion::slerpni(const Quaternion &p_to, real_t p_weight) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG(!is_normalized(), Quaternion(), "The start quaternion " + operator String() + " must be normalized."); ERR_FAIL_COND_V_MSG(!p_to.is_normalized(), Quaternion(), "The end quaternion " + p_to.operator String() + " must be normalized."); @@ -175,7 +175,7 @@ Quaternion Quaternion::slerpni(const Quaternion &p_to, const real_t &p_weight) c invFactor * from.w + newFactor * p_to.w); } -Quaternion Quaternion::spherical_cubic_interpolate(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const { +Quaternion Quaternion::spherical_cubic_interpolate(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, real_t p_weight) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG(!is_normalized(), Quaternion(), "The start quaternion " + operator String() + " must be normalized."); ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quaternion(), "The end quaternion " + p_b.operator String() + " must be normalized."); @@ -225,8 +225,8 @@ Quaternion Quaternion::spherical_cubic_interpolate(const Quaternion &p_b, const return q1.slerp(q2, p_weight); } -Quaternion Quaternion::spherical_cubic_interpolate_in_time(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight, - const real_t &p_b_t, const real_t &p_pre_a_t, const real_t &p_post_b_t) const { +Quaternion Quaternion::spherical_cubic_interpolate_in_time(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, real_t p_weight, + real_t p_b_t, real_t p_pre_a_t, real_t p_post_b_t) const { #ifdef MATH_CHECKS ERR_FAIL_COND_V_MSG(!is_normalized(), Quaternion(), "The start quaternion " + operator String() + " must be normalized."); ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quaternion(), "The end quaternion " + p_b.operator String() + " must be normalized."); |