diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 04:08:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 04:08:01 +0400 |
commit | c04850ec06135f20f935d7f493214fa107435176 (patch) | |
tree | 7c9af0854c1bff9296b1ba53e66c14532bbe75a7 /source/blender/blenlib/intern/math_rotation.c | |
parent | 2e7c8bbeec1592212c315172a427f2c5dab70de7 (diff) |
python mathutils change
quat * quat was returning the dot product (a float), rather then the cross product.
Use BLI_math's mul_qt_qtqt() function.
Diffstat (limited to 'source/blender/blenlib/intern/math_rotation.c')
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index a8cacb60f05..4d015e527a8 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -63,7 +63,7 @@ void mul_qt_qtqt(float *q, const float *q1, const float *q2) } /* Assumes a unit quaternion */ -void mul_qt_v3(float *q, float *v) +void mul_qt_v3(const float *q, float *v) { float t0, t1, t2; @@ -111,7 +111,7 @@ void invert_qt_qt(float *q1, const float *q2) } /* simple mult */ -void mul_qt_fl(float *q, float f) +void mul_qt_fl(float *q, const float f) { q[0] *= f; q[1] *= f; @@ -127,7 +127,7 @@ void sub_qt_qtqt(float *q, float *q1, float *q2) } /* angular mult factor */ -void mul_fac_qt_fl(float *q, float fac) +void mul_fac_qt_fl(float *q, const float fac) { float angle= fac*saacos(q[0]); /* quat[0]= cos(0.5*angle), but now the 0.5 and 2.0 rule out */ |