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-11-11 16:00:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-11 16:00:08 +0400
commit094c9799f9926ae37515a1fe0380403ce3298a77 (patch)
tree780f06d65010a80ae7d3c67000af00db89d11a32 /source/blender/ikplugin/intern
parenteb7bccb39a639683275ed0b80b927cd5eb8264fa (diff)
quiet -Wdouble-promotion warnings
Diffstat (limited to 'source/blender/ikplugin/intern')
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
index 2a83052c827..7159c09d703 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.c
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -71,7 +71,7 @@ static void initialize_posetree(struct Object *UNUSED(ob), bPoseChannel *pchan_t
if (data->flag & CONSTRAINT_IK_AUTO) break;
if (data->tar==NULL) continue;
if (data->tar->type==OB_ARMATURE && data->subtarget[0]==0) continue;
- if ((con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF))==0 && (con->enforce!=0.0)) break;
+ if ((con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF))==0 && (con->enforce != 0.0f)) break;
}
}
if(con==NULL) return;
@@ -255,7 +255,7 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
if(!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP))
flag |= IK_ZDOF;
- if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ if(tree->stretch && (pchan->ikstretch > 0.0f)) {
flag |= IK_TRANS_YDOF;
hasstretch = 1;
}
@@ -320,9 +320,9 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
IK_SetStiffness(seg, IK_Y, pchan->stiffness[1]);
IK_SetStiffness(seg, IK_Z, pchan->stiffness[2]);
- if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ if(tree->stretch && (pchan->ikstretch > 0.0f)) {
float ikstretch = pchan->ikstretch*pchan->ikstretch;
- IK_SetStiffness(seg, IK_TRANS_Y, MIN2(1.0-ikstretch, 0.99));
+ IK_SetStiffness(seg, IK_TRANS_Y, MIN2(1.0f-ikstretch, 0.99f));
IK_SetLimit(seg, IK_TRANS_Y, 0.001, 1e10);
}
}
@@ -389,10 +389,10 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
}
/* do we need blending? */
- if (!resultblend && target->con->enforce!=1.0) {
+ if (!resultblend && target->con->enforce != 1.0f) {
float q1[4], q2[4], q[4];
float fac= target->con->enforce;
- float mfac= 1.0-fac;
+ float mfac= 1.0f-fac;
pchan= tree->pchan[target->tip];
@@ -415,13 +415,13 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
iktarget= iktree[target->tip];
- if(data->weight != 0.0) {
+ if(data->weight != 0.0f) {
if(poleconstrain)
IK_SolverSetPoleVectorConstraint(solver, iktarget, goalpos,
polepos, data->poleangle, (poleangledata == data));
IK_SolverAddGoal(solver, iktarget, goalpos, data->weight);
}
- if((data->flag & CONSTRAINT_IK_ROT) && (data->orientweight != 0.0))
+ if((data->flag & CONSTRAINT_IK_ROT) && (data->orientweight != 0.0f))
if((data->flag & CONSTRAINT_IK_AUTO)==0)
IK_SolverAddGoalOrientation(solver, iktarget, goalrot,
data->orientweight);
@@ -448,20 +448,20 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
float parentstretch, stretch;
pchan= tree->pchan[a];
- parentstretch= (tree->parent[a] >= 0)? ikstretch[tree->parent[a]]: 1.0;
+ parentstretch= (tree->parent[a] >= 0)? ikstretch[tree->parent[a]]: 1.0f;
- if(tree->stretch && (pchan->ikstretch > 0.0)) {
+ if(tree->stretch && (pchan->ikstretch > 0.0f)) {
float trans[3], length;
IK_GetTranslationChange(iktree[a], trans);
length= pchan->bone->length*len_v3(pchan->pose_mat[1]);
- ikstretch[a]= (length == 0.0)? 1.0: (trans[1]+length)/length;
+ ikstretch[a]= (length == 0.0f)? 1.0f: (trans[1]+length)/length;
}
else
ikstretch[a] = 1.0;
- stretch= (parentstretch == 0.0)? 1.0: ikstretch[a]/parentstretch;
+ stretch= (parentstretch == 0.0f)? 1.0f: ikstretch[a]/parentstretch;
mul_v3_fl(tree->basis_change[a][0], stretch);
mul_v3_fl(tree->basis_change[a][1], stretch);