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-27 21:12:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 21:12:59 +0400
commit9c8f1e2ef487483bc374feaed9ff709e07638623 (patch)
tree1157b72533f1b2c2e2082d91562bd9a2da4290fb /source/blender/imbuf/intern/rectop.c
parent4237c0393a9d1f089f01dd7c4b223b1f61b15023 (diff)
imbuf, mathutils & readfile: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/imbuf/intern/rectop.c')
-rw-r--r--source/blender/imbuf/intern/rectop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index a6556cc3a9a..44af7ffdb3f 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -164,7 +164,7 @@ unsigned int IMB_blend_color(unsigned int src1, unsigned int src2, int fac, IMB_
static void blend_color_mix_float(float *cp, float *cp1, float *cp2, float fac)
{
- float mfac= 1.0-fac;
+ float mfac= 1.0f-fac;
cp[0]= mfac*cp1[0] + fac*cp2[0];
cp[1]= mfac*cp1[1] + fac*cp2[1];
cp[2]= mfac*cp1[2] + fac*cp2[2];
@@ -194,7 +194,7 @@ static void blend_color_sub_float(float *cp, float *cp1, float *cp2, float fac)
static void blend_color_mul_float(float *cp, float *cp1, float *cp2, float fac)
{
- float mfac= 1.0-fac;
+ float mfac= 1.0f-fac;
cp[0]= mfac*cp1[0] + fac*(cp1[0]*cp2[0]);
cp[1]= mfac*cp1[1] + fac*(cp1[1]*cp2[1]);
@@ -488,7 +488,7 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
float a; /* alpha */
float ai; /* alpha inverted */
float aich; /* alpha, inverted, ai/255.0 - Convert char to float at the same time */
- if ((!rect && !rectf) || (!col) || col[3]==0.0)
+ if ((!rect && !rectf) || (!col) || col[3]==0.0f)
return;
/* sanity checks for coords */
@@ -510,7 +510,7 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
unsigned char chr=0, chg=0, chb=0;
float fr=0, fg=0, fb=0;
- if (a == 1.0) {
+ if (a == 1.0f) {
chr = FTOCHAR(col[0]);
chg = FTOCHAR(col[1]);
chb = FTOCHAR(col[2]);
@@ -523,7 +523,7 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
for (i = 0; i < x2-x1; i++) {
pixel = rect + 4 * (((y1 + j) * width) + (x1 + i));
if (pixel >= rect && pixel < rect+ (4 * (width * height))) {
- if (a == 1.0) {
+ if (a == 1.0f) {
pixel[0] = chr;
pixel[1] = chg;
pixel[2] = chb;
@@ -542,7 +542,7 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
for (j = 0; j < y2-y1; j++) {
for (i = 0; i < x2-x1; i++) {
pixel = rectf + 4 * (((y1 + j) * width) + (x1 + i));
- if (a == 1.0) {
+ if (a == 1.0f) {
pixel[0] = col[0];
pixel[1] = col[1];
pixel[2] = col[2];