summaryrefslogtreecommitdiffstats
path: root/core/math/basis.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-12-07 03:16:31 -0500
committerAaron Franke <arnfranke@yahoo.com>2020-12-07 05:01:33 -0500
commit5465e604bb8118450feb7422793efb7dc3e9d28b (patch)
tree64d86d44d5bc7939e879e1421046f9596445764c /core/math/basis.cpp
parent73eb8d5a2094fc7512b17712b402bdb73c5f5b63 (diff)
downloadredot-engine-5465e604bb8118450feb7422793efb7dc3e9d28b.tar.gz
Improve argument names for core types
Diffstat (limited to 'core/math/basis.cpp')
-rw-r--r--core/math/basis.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index c6030d9757..a64f29517d 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -1017,15 +1017,15 @@ void Basis::set_diagonal(const Vector3 &p_diag) {
elements[2][2] = p_diag.z;
}
-Basis Basis::slerp(const Basis &target, const real_t &t) const {
+Basis Basis::slerp(const Basis &p_to, const real_t &p_weight) const {
//consider scale
Quat from(*this);
- Quat to(target);
+ Quat to(p_to);
- Basis b(from.slerp(to, t));
- b.elements[0] *= Math::lerp(elements[0].length(), target.elements[0].length(), t);
- b.elements[1] *= Math::lerp(elements[1].length(), target.elements[1].length(), t);
- b.elements[2] *= Math::lerp(elements[2].length(), target.elements[2].length(), t);
+ Basis b(from.slerp(to, p_weight));
+ b.elements[0] *= Math::lerp(elements[0].length(), p_to.elements[0].length(), p_weight);
+ b.elements[1] *= Math::lerp(elements[1].length(), p_to.elements[1].length(), p_weight);
+ b.elements[2] *= Math::lerp(elements[2].length(), p_to.elements[2].length(), p_weight);
return b;
}