From 3a81f23e0975ea87ade780965462ad5b15b39d95 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 19 Aug 2011 16:21:29 +0000 Subject: warning cleanup for -Wdouble-promotion --- source/blender/blenkernel/intern/cloth.c | 2 +- source/blender/blenlib/intern/jitter.c | 74 +++++++++++----------- source/blender/blenlib/intern/math_geom.c | 6 +- source/blender/blenlib/intern/math_rotation.c | 6 +- source/blender/blenlib/intern/rct.c | 8 +-- source/blender/blenlib/intern/scanfill.c | 16 ++--- .../blender/editors/interface/interface_widgets.c | 2 +- source/blender/editors/object/object_add.c | 2 +- source/blender/editors/object/object_bake.c | 4 +- .../editors/space_outliner/outliner_intern.h | 4 +- source/blender/editors/space_view3d/view3d_draw.c | 8 +-- source/blender/editors/space_view3d/view3d_edit.c | 4 +- source/blender/editors/space_view3d/view3d_fly.c | 2 +- source/blender/editors/transform/transform.c | 2 +- source/blender/makesrna/intern/rna_sequencer.c | 2 +- .../blender/render/intern/source/convertblender.c | 16 ++--- .../blender/render/intern/source/volume_precache.c | 4 +- source/blender/render/intern/source/volumetric.c | 18 +++--- source/blender/render/intern/source/voxeldata.c | 6 +- source/blender/windowmanager/intern/wm_operators.c | 2 +- 20 files changed, 94 insertions(+), 94 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index ea055e90b45..3a86389dba7 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -923,7 +923,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d for(i = 0; i < dm->getNumVerts(dm); i++) { - maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len*2.0)); + maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len*2.0f)); } clmd->clothObject->bvhselftree = bvhselftree_build_from_cloth ( clmd, maxdist ); diff --git a/source/blender/blenlib/intern/jitter.c b/source/blender/blenlib/intern/jitter.c index 16f0c86c449..f0e81d6b5e9 100644 --- a/source/blender/blenlib/intern/jitter.c +++ b/source/blender/blenlib/intern/jitter.c @@ -53,10 +53,10 @@ void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1) y = jit1[i+1]; for (j = 2*num-2; j>=0 ; j-=2) { if (i != j){ - vecx = jit1[j] - x - 1.0; - vecy = jit1[j+1] - y - 1.0; + vecx = jit1[j] - x - 1.0f; + vecy = jit1[j+1] - y - 1.0f; for (k = 3; k>0 ; k--){ - if( fabs(vecx)0 && len0 && len0 && len= 0 ; j-=2){ if (i != j){ - vecx = jit1[j] - x - 1.0; - vecy = jit1[j+1] - y - 1.0; + vecx = jit1[j] - x - 1.0f; + vecy = jit1[j+1] - y - 1.0f; - if( fabs(vecx) 0.0) { + else if (i > 0.0f) { const float i_sqrt= sqrt(i); /* avoid calc twice */ /* first intersection */ @@ -456,7 +456,7 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], madd_v2_v2v2fl(r_p1, l1, ldir, mu); return 1; } - else if (i > 0.0) { + else if (i > 0.0f) { const float i_sqrt= sqrt(i); /* avoid calc twice */ /* first intersection */ @@ -2010,7 +2010,7 @@ void resolve_quad_uv(float uv[2], const float st[2], const float st0[2], const f } if(IS_ZERO(denom)==0) - uv[1]= (float) (( (1-uv[0])*(st0[i]-st[i]) + uv[0]*(st1[i]-st[i]) ) / denom); + uv[1]= (float) (( (1.0f-uv[0])*(st0[i]-st[i]) + uv[0]*(st1[i]-st[i]) ) / denom); } } diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index dfd715ccbf2..e3e507d016a 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -213,7 +213,7 @@ void quat_to_mat4(float m[][4], const float q[4]) double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; #ifdef DEBUG - if(!((q0=dot_qtqt(q, q))==0.0f || (fabsf(q0-1.0f) < (float)QUAT_EPSILON))) { + if(!((q0=dot_qtqt(q, q))==0.0f || (fabs(q0-1.0) < QUAT_EPSILON))) { fprintf(stderr, "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n", (float)q0); } #endif @@ -492,8 +492,8 @@ void vec_to_quat(float q[4], const float vec[3], short axis, const short upflag) else angle= (float)(-0.5*atan2(-fp[0], -fp[1])); } - co= (float)cos(angle); - si= (float)(sin(angle)/len1); + co= cosf(angle); + si= sinf(angle)/len1; q2[0]= co; q2[1]= x2*si; q2[2]= y2*si; diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index 17b07b49309..31ae8adc2d4 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -233,10 +233,10 @@ int BLI_isect_rcti(rcti *src1, rcti *src2, rcti *dest) void BLI_copy_rcti_rctf(rcti *tar, const rctf *src) { - tar->xmin= floor(src->xmin + 0.5); - tar->xmax= floor((src->xmax - src->xmin) + 0.5); - tar->ymin= floor(src->ymin + 0.5); - tar->ymax= floor((src->ymax - src->ymin) + 0.5); + tar->xmin= floor(src->xmin + 0.5f); + tar->xmax= floor((src->xmax - src->xmin) + 0.5f); + tar->ymin= floor(src->ymin + 0.5f); + tar->ymax= floor((src->ymax - src->ymin) + 0.5f); } void print_rctf(const char *str, rctf *rect) diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 47a07d86e66..b159106f748 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -288,7 +288,7 @@ static short testedgeside(float *v1, float *v2, float *v3) inp= (v2[cox]-v1[cox])*(v1[coy]-v3[coy]) +(v1[coy]-v2[coy])*(v1[cox]-v3[cox]); - if(inp<0.0) return 0; + if(inp < 0.0f) return 0; else if(inp==0) { if(v1[cox]==v3[cox] && v1[coy]==v3[coy]) return 0; if(v2[cox]==v3[cox] && v2[coy]==v3[coy]) return 0; @@ -312,8 +312,8 @@ static short addedgetoscanvert(ScFillVert *sc, EditEdge *eed) y= eed->v1->co[coy]; fac1= eed->v2->co[coy]-y; - if(fac1==0.0) { - fac1= 1.0e10*(eed->v2->co[cox]-x); + if(fac1==0.0f) { + fac1= 1.0e10f*(eed->v2->co[cox]-x); } else fac1= (x-eed->v2->co[cox])/fac1; @@ -324,8 +324,8 @@ static short addedgetoscanvert(ScFillVert *sc, EditEdge *eed) if(ed->v2==eed->v2) return 0; fac= ed->v2->co[coy]-y; - if(fac==0.0) { - fac= 1.0e10*(ed->v2->co[cox]-x); + if(fac==0.0f) { + fac= 1.0e10f*(ed->v2->co[cox]-x); } else fac= (x-ed->v2->co[cox])/fac; @@ -443,7 +443,7 @@ static void testvertexnearedge(void) vec2[1]= eed->v2->co[coy]; if(boundinsideEV(eed,eve)) { dist= dist_to_line_v2(vec1,vec2,vec3); - if(distv1, eve); @@ -816,7 +816,7 @@ int BLI_edgefill(short mat_nr) if(v2) { if( compare_v3v3(v2, eve->co, COMPLIMIT)==0) { len= normal_tri_v3( norm,v1, v2, eve->co); - if(len != 0.0) break; + if(len != 0.0f) break; } } else if(compare_v3v3(v1, eve->co, COMPLIMIT)==0) { @@ -825,7 +825,7 @@ int BLI_edgefill(short mat_nr) eve= eve->next; } - if(len==0.0) return 0; /* no fill possible */ + if(len==0.0f) return 0; /* no fill possible */ norm[0]= fabs(norm[0]); norm[1]= fabs(norm[1]); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d235fd0c16a..5da875356ea 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -180,7 +180,7 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y glEnable(GL_BLEND); glGetFloatv(GL_CURRENT_COLOR, color); - color[3]*= 0.125; + color[3] *= 0.125f; glColor4fv(color); /* for each AA step */ diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index cd42661f320..d5f10f1d37d 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -182,7 +182,7 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode) } RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX); - RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", -M_PI * 2.0f, M_PI * 2.0f); + RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f); prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", ""); RNA_def_property_flag(prop, PROP_HIDDEN); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 679e4e58017..ee162464c70 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -636,14 +636,14 @@ static void apply_heights_data(void *bake_data) if(ibuf->rect_float) { float *rrgbf= ibuf->rect_float + i*4; - if(max-min > 1e-5) height= (heights[i]-min)/(max-min); + if(max-min > 1e-5f) height= (heights[i]-min)/(max-min); else height= 0; rrgbf[0]=rrgbf[1]=rrgbf[2]= height; } else { char *rrgb= (char*)ibuf->rect + i*4; - if(max-min > 1e-5) height= (heights[i]-min)/(max-min); + if(max-min > 1e-5f) height= (heights[i]-min)/(max-min); else height= 0; rrgb[0]=rrgb[1]=rrgb[2]= FTOCHAR(height); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 1a6448588aa..cf4ce9c06a8 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -124,8 +124,8 @@ typedef struct TreeElement { #define OL_TOGW OL_TOG_RESTRICT_VIEWX #define OL_RNA_COLX (UI_UNIT_X*15) -#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5) -#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5) +#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5f) +#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5f) /* outliner_tree.c ----------------------------------------------- */ diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 7cf95261211..f8837594ddb 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -721,7 +721,7 @@ static void draw_rotation_guide(RegionView3D *rv3d) { #define ROT_AXIS_DETAIL 13 const float s = 0.05f * scale; - const float step = 2.f * M_PI / ROT_AXIS_DETAIL; + const float step = 2.f * (float)(M_PI / ROT_AXIS_DETAIL); float angle; int i; @@ -1041,7 +1041,7 @@ static void drawviewborder_triangle(float x1, float x2, float y1, float y2, cons glBegin(GL_LINES); if(w > h) { if(golden) { - ofs = w * (1.0f-(1.0f/1.61803399)); + ofs = w * (1.0f-(1.0f/1.61803399f)); } else { ofs = h * (h / w); @@ -1059,7 +1059,7 @@ static void drawviewborder_triangle(float x1, float x2, float y1, float y2, cons } else { if(golden) { - ofs = h * (1.0f-(1.0f/1.61803399)); + ofs = h * (1.0f-(1.0f/1.61803399f)); } else { ofs = w * (w / h); @@ -1203,7 +1203,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) if (ca->dtx & CAM_DTX_GOLDEN) { UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); - drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399)); + drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399f)); } if (ca->dtx & CAM_DTX_GOLDEN_TRI_A) { diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 3e6bbc13334..979a602b4f5 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1697,7 +1697,7 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) static void view_dolly_mouseloc(ARegion *ar, float orig_ofs[3], float dvec[3], float dfac) { RegionView3D *rv3d= ar->regiondata; - madd_v3_v3v3fl(rv3d->ofs, orig_ofs, dvec, -(1.0 - dfac)); + madd_v3_v3v3fl(rv3d->ofs, orig_ofs, dvec, -(1.0f - dfac)); } static void viewdolly_apply(ViewOpsData *vod, int x, int y, const short zoom_invert) @@ -1718,7 +1718,7 @@ static void viewdolly_apply(ViewOpsData *vod, int x, int y, const short zoom_inv if (zoom_invert) SWAP(float, len1, len2); - zfac = 1.0 + ((len2 - len1) * 0.01 * vod->rv3d->dist); + zfac = 1.0f + ((len2 - len1) * 0.01f * vod->rv3d->dist); } if(zfac != 1.0f) diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 046037a092f..30d1a508888 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -867,7 +867,7 @@ static int flyApply(bContext *C, FlyInfo *fly) upvec[2]=1; mul_m3_v3(mat, upvec); /*make sure we have some z rolling*/ - if (fabs(upvec[2]) > 0.00001f) { + if (fabsf(upvec[2]) > 0.00001f) { roll= upvec[2] * -5.0f; upvec[0]= 1.0f; /*rotate the view about this axis*/ diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 03a98bf30d8..b234ac4ceec 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4648,7 +4648,7 @@ static int createSlideVerts(TransInfo *t) uv_new = tf->uv[k]; if (ev->tmp.l) { - if (fabs(suv->origuv[0]-uv_new[0]) > 0.0001f || fabs(suv->origuv[1]-uv_new[1]) > 0.0001f) { + if (fabsf(suv->origuv[0]-uv_new[0]) > 0.0001f || fabs(suv->origuv[1]-uv_new[1]) > 0.0001f) { ev->tmp.l = -1; /* Tag as invalid */ BLI_linklist_free(suv->fuv_list,NULL); suv->fuv_list = NULL; diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 8c4e4d9e736..476ac325848 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1481,7 +1481,7 @@ static void rna_def_wipe(BlenderRNA *brna) #if 1 /* expose as radians */ prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_funcs(prop, "rna_WipeSequence_angle_get", "rna_WipeSequence_angle_set", NULL); - RNA_def_property_range(prop, DEG2RAD(-90.0f), DEG2RAD(90.0f)); + RNA_def_property_range(prop, DEG2RAD(-90.0), DEG2RAD(90.0)); #else prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "angle"); diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index b385b507707..f749d1ba004 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -192,10 +192,10 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), /* minimal free space (starting at camera) */ starmindist= wrld->starmindist; - if (stargrid <= 0.10) return; + if (stargrid <= 0.10f) return; if (re) re->flag |= R_HALO; - else stargrid *= 1.0; /* then it draws fewer */ + else stargrid *= 1.0f; /* then it draws fewer */ if(re) invert_m4_m4(mat, re->viewmat); else unit_m4(mat); @@ -267,17 +267,17 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), if (alpha >= clipend) alpha = 0.0; else if (alpha <= starmindist) alpha = 0.0; - else if (alpha <= 2.0 * starmindist) { + else if (alpha <= 2.0f * starmindist) { alpha = (alpha - starmindist) / starmindist; } else { - alpha -= 2.0 * starmindist; - alpha /= (clipend - 2.0 * starmindist); - alpha = 1.0 - alpha; + alpha -= 2.0f * starmindist; + alpha /= (clipend - 2.0f * starmindist); + alpha = 1.0f - alpha; } } - if (alpha != 0.0) { + if (alpha != 0.0f) { fac = force * BLI_drand(); har = initstar(re, obr, vec, fac); @@ -822,7 +822,7 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d if(obr->totvert==0) return; asverts= MEM_callocN(sizeof(ASvert)*obr->totvert, "all smooth verts"); - thresh= cos( M_PI*(0.5f+(float)degr)/180.0 ); + thresh= cosf((float)M_PI*(0.5f+(float)degr)/180.0f ); /* step zero: give faces normals of original mesh, if this is provided */ diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index faa915b7f6c..2037acc943f 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -400,7 +400,7 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi sb[j] += vp->data_b[i]; /* Displays progress every second */ - if(time-lasttime>1.0f) { + if(time-lasttime>1.0) { char str[64]; BLI_snprintf(str, sizeof(str), "Simulating multiple scattering: %d%%", (int)(100.0f * (c / total))); re->i.infostr= str; @@ -747,7 +747,7 @@ static void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *o caching=0; time= PIL_check_seconds_timer(); - if(time-lasttime>1.0f) { + if(time-lasttime>1.0) { char str[64]; BLI_snprintf(str, sizeof(str), "Precaching volume: %d%%", (int)(100.0f * ((float)counter / (float)totparts))); re->i.infostr= str; diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index 359002d05ae..19bbb11e143 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -422,9 +422,9 @@ static void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize tau[1] += stepd * sigma_t[1]; tau[2] += stepd * sigma_t[2]; - tr[0] *= exp(-tau[0]); - tr[1] *= exp(-tau[1]); - tr[2] *= exp(-tau[2]); + tr[0] *= expf(-tau[0]); + tr[1] *= expf(-tau[1]); + tr[2] *= expf(-tau[2]); } /* Compute transmittance = e^(-attenuation) */ @@ -473,7 +473,7 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return; if ((lar->lay & shi->lay)==0) return; - if (lar->energy == 0.0) return; + if (lar->energy == 0.0f) return; if ((visifac= lamp_get_visibility(lar, co, lv, &lampdist)) == 0.f) return; @@ -613,7 +613,7 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float /* transmittance component (alpha) */ vol_get_transmittance_seg(shi, tr, stepsize, co, density); - if (t0 > t1 * 0.25) { + if (t0 > t1 * 0.25f) { /* only use depth cutoff after we've traced a little way into the volume */ if (luminance(tr) < shi->mat->vol.depth_cutoff) break; } @@ -623,9 +623,9 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float if (shi->obi->volume_precache) { float p2[3]; - p2[0] = p[0] + (step_vec[0] * 0.5); - p2[1] = p[1] + (step_vec[1] * 0.5); - p2[2] = p[2] + (step_vec[2] * 0.5); + p2[0] = p[0] + (step_vec[0] * 0.5f); + p2[1] = p[1] + (step_vec[1] * 0.5f); + p2[2] = p[2] + (step_vec[2] * 0.5f); vol_get_precached_scattering(&R, shi, scatter_col, p2); } else @@ -817,7 +817,7 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr) volume_trace(shi, shr, VOL_SHADE_INSIDE); shr->alpha = shr->alpha + prev_alpha; - CLAMP(shr->alpha, 0.0, 1.0); + CLAMP(shr->alpha, 0.0f, 1.0f); shi->mat = mat_backup; shi->obi = obi_backup; diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 232f7fdeede..2ba346ae4c5 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -413,9 +413,9 @@ int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres) } case TEX_REPEAT: { - co[0] = co[0] - floor(co[0]); - co[1] = co[1] - floor(co[1]); - co[2] = co[2] - floor(co[2]); + co[0] = co[0] - floorf(co[0]); + co[1] = co[1] - floorf(co[1]); + co[2] = co[2] - floorf(co[2]); break; } case TEX_EXTEND: diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 1beb5b3dda3..fdf89cfd2be 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2926,7 +2926,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd case PROP_FACTOR: r1= (1 - rc->current_value) * WM_RADIAL_CONTROL_DISPLAY_SIZE; r2= tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; - alpha = rc->current_value / 2 + 0.5; + alpha = rc->current_value / 2.0f + 0.5f; break; case PROP_ANGLE: r1= r2= tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; -- cgit v1.2.3