diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-23 15:25:40 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-23 15:28:32 +0300 |
commit | 02f083cdcecf74a169114850337a99c802c53e34 (patch) | |
tree | 5bfd5c4ca3fb61a48d8205875e2451b51a84a2d4 /source/blender/blenlib/intern/math_rotation.c | |
parent | 1574b691f3cc5928c408f24901c8b5a3ebfe7103 (diff) |
BLI_math_rotation: properly name the quaternion power function.
"angular mult factor" is a completely unintelligible description
for a function that raises a unit quaternion to the scalar power.
Diffstat (limited to 'source/blender/blenlib/intern/math_rotation.c')
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 3e74173ef78..8e5b3f0000e 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -193,9 +193,10 @@ void sub_qt_qtqt(float q[4], const float q1[4], const float q2[4]) mul_qt_qtqt(q, q1, nq2); } -/* angular mult factor */ -void mul_fac_qt_fl(float q[4], const float fac) +/* raise a unit quaternion to the specified power */ +void pow_qt_fl_normalized(float q[4], const float fac) { + BLI_ASSERT_UNIT_QUAT(q); const float angle = fac * saacos(q[0]); /* quat[0] = cos(0.5 * angle), but now the 0.5 and 2.0 rule out */ const float co = cosf(angle); const float si = sinf(angle); |