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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-28 08:22:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-28 08:22:50 +0400
commitdd56ebe6076d7ffbe9dd698a5c1bc94fff6ff306 (patch)
tree170edbbd5cd75801473c5adf1b4491f84bc8f31e /source/blender/blenkernel/intern/armature.c
parentac1cb5ee055840ba3481b8ad490e3be2a6a49cf2 (diff)
blenkernel: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r--source/blender/blenkernel/intern/armature.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 99c70564d66..ddfa738449d 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -438,7 +438,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
scale[1]= len_v3(pchan->pose_mat[1]);
scale[2]= len_v3(pchan->pose_mat[2]);
- if(fabs(scale[0] - scale[1]) > 1e-6f || fabs(scale[1] - scale[2]) > 1e-6f) {
+ if(fabsf(scale[0] - scale[1]) > 1e-6f || fabsf(scale[1] - scale[2]) > 1e-6f) {
unit_m4(scalemat);
scalemat[0][0]= scale[0];
scalemat[1][1]= scale[1];
@@ -734,11 +734,11 @@ static float dist_bone_deform(bPoseChannel *pchan, bPoseChanDeform *pdef_info, f
fac= distfactor_to_bone(cop, bone->arm_head, bone->arm_tail, bone->rad_head, bone->rad_tail, bone->dist);
- if (fac>0.0) {
+ if (fac > 0.0f) {
fac*=bone->weight;
contrib= fac;
- if(contrib>0.0) {
+ if(contrib > 0.0f) {
if(vec) {
if(bone->segments>1)
// applies on cop and bbonemat
@@ -1277,7 +1277,7 @@ void BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], floa
}
/* when converting to axis-angle, we need a special exception for the case when there is no axis */
- if (IS_EQ(axis[0], axis[1]) && IS_EQ(axis[1], axis[2])) {
+ if (IS_EQF(axis[0], axis[1]) && IS_EQF(axis[1], axis[2])) {
/* for now, rotate around y-axis then (so that it simply becomes the roll) */
axis[1]= 1.0f;
}
@@ -1336,7 +1336,7 @@ void vec_roll_to_mat3(float *vec, float roll, float mat[][3])
/* was 0.0000000000001, caused bug [#23954], smaller values give unstable
* roll when toggling editmode */
- if (dot_v3v3(axis,axis) > 0.00001) {
+ if (dot_v3v3(axis,axis) > 0.00001f) {
/* if nor is *not* a multiple of target ... */
normalize_v3(axis);
@@ -1379,7 +1379,7 @@ void where_is_armature_bone(Bone *bone, Bone *prevbone)
bone->length= len_v3v3(bone->head, bone->tail);
/* this is called on old file reading too... */
- if(bone->xwidth==0.0) {
+ if(bone->xwidth==0.0f) {
bone->xwidth= 0.1f;
bone->zwidth= 0.1f;
bone->segments= 1;
@@ -1970,12 +1970,12 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
/* calculate volume preservation factor which is
* basically the inverse of the y-scaling factor
*/
- if (fabs(scaleFac) != 0.0f) {
- scale= 1.0 / fabs(scaleFac);
+ if (fabsf(scaleFac) != 0.0f) {
+ scale= 1.0f / fabsf(scaleFac);
/* we need to clamp this within sensible values */
// NOTE: these should be fine for now, but should get sanitised in future
- scale= MIN2(MAX2(scale, 0.0001) , 100000);
+ CLAMP(scale, 0.0001f, 100000.0f);
}
else
scale= 1.0f;