diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-28 08:22:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-28 08:22:50 +0400 |
commit | dd56ebe6076d7ffbe9dd698a5c1bc94fff6ff306 (patch) | |
tree | 170edbbd5cd75801473c5adf1b4491f84bc8f31e /source/blender/blenkernel/intern/texture.c | |
parent | ac1cb5ee055840ba3481b8ad490e3be2a6a49cf2 (diff) |
blenkernel: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index c0261d3b5a3..e8c4a21d041 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -223,9 +223,9 @@ void init_mapping(TexMapping *texmap) size_to_mat3( smat,texmap->size); - eul[0]= (M_PI/180.0f)*texmap->rot[0]; - eul[1]= (M_PI/180.0f)*texmap->rot[1]; - eul[2]= (M_PI/180.0f)*texmap->rot[2]; + eul[0]= DEG2RADF(texmap->rot[0]); + eul[1]= DEG2RADF(texmap->rot[1]); + eul[2]= DEG2RADF(texmap->rot[2]); eul_to_mat3( rmat,eul); mul_m3_m3m3(mat, rmat, smat); @@ -373,10 +373,10 @@ int do_colorband(ColorBand *coba, float in, float out[4]) out[1]= t[3]*cbd3->g +t[2]*cbd2->g +t[1]*cbd1->g +t[0]*cbd0->g; out[2]= t[3]*cbd3->b +t[2]*cbd2->b +t[1]*cbd1->b +t[0]*cbd0->b; out[3]= t[3]*cbd3->a +t[2]*cbd2->a +t[1]*cbd1->a +t[0]*cbd0->a; - CLAMP(out[0], 0.0, 1.0); - CLAMP(out[1], 0.0, 1.0); - CLAMP(out[2], 0.0, 1.0); - CLAMP(out[3], 0.0, 1.0); + CLAMP(out[0], 0.0f, 1.0f); + CLAMP(out[1], 0.0f, 1.0f); + CLAMP(out[2], 0.0f, 1.0f); + CLAMP(out[3], 0.0f, 1.0f); } else { |