Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-10 23:43:45 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-10 23:43:45 +0300
commit37e4a311b0ad9da7177e50620efc3561e2dd7045 (patch)
tree8aea2cc851ab828ee040d601ed4c776283fd639a /source/blender/blenkernel/intern/fcurve.c
parent4617bb68ba4b1c5ab459673fffd98bf7203bb4f2 (diff)
Math Lib
* Convert all code to use new functions. * Branch maintainers may want to skip this commit, and run this conversion script instead, if they use a lot of math functions in new code: http://www.pasteall.org/9052/python
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 0ecd1fe912b..a1e6570608f 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -43,7 +43,7 @@
#include "DNA_anim_types.h"
#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
#include "BLI_noise.h"
#include "BKE_fcurve.h"
@@ -924,11 +924,11 @@ static float evaluate_driver (ChannelDriver *driver, float evaltime)
}
/* use the final posed locations */
- Mat4ToQuat(pchan->pose_mat, q1);
- Mat4ToQuat(pchan2->pose_mat, q2);
+ mat4_to_quat( q1,pchan->pose_mat);
+ mat4_to_quat( q2,pchan2->pose_mat);
- QuatInv(q1);
- QuatMul(quat, q1, q2);
+ invert_qt(q1);
+ mul_qt_qtqt(quat, q1, q2);
angle = 2.0f * (saacos(quat[0]));
angle= ABS(angle);
@@ -1017,13 +1017,13 @@ static int findzero (float x, float q0, float q1, float q2, float q3, float *o)
if (d > 0.0) {
t= sqrt(d);
- o[0]= (float)(Sqrt3d(-q+t) + Sqrt3d(-q-t) - a);
+ o[0]= (float)(sqrt3d(-q+t) + sqrt3d(-q-t) - a);
if ((o[0] >= SMALL) && (o[0] <= 1.000001)) return 1;
else return 0;
}
else if (d == 0.0) {
- t= Sqrt3d(-q);
+ t= sqrt3d(-q);
o[0]= (float)(2*t - a);
if ((o[0] >= SMALL) && (o[0] <= 1.000001)) nr++;