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>2014-01-15 06:00:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-15 06:40:40 +0400
commitb8b412230b1e1ed43295d5c299477a2cba73355e (patch)
tree0b3d61142c7a0490293c975a636165057f20c58e /source/blender/render
parente5c7535bebc37e04489fac4e88beca8cc5677d7d (diff)
Code Cleanup: use iroundf
also increase precision of rctf print functions
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/imagetexture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index 37c6a5ffdd1..716c4b8af65 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -1317,7 +1317,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
a = max_ff(a, 1.0f);
b = max_ff(b, 1.0f);
fProbes = 2.f*(a / b) - 1.f;
- AFD.iProbes = (int)floorf(fProbes + 0.5f);
+ AFD.iProbes = iroundf(fProbes);
AFD.iProbes = MIN2(AFD.iProbes, tex->afmax);
if (AFD.iProbes < fProbes)
b = 2.f*a / (float)(AFD.iProbes + 1);
@@ -1420,7 +1420,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
b = max_ff(b, 1.0f);
fProbes = 2.f*(a / b) - 1.f;
/* no limit to number of Probes here */
- AFD.iProbes = (int)floorf(fProbes + 0.5f);
+ AFD.iProbes = iroundf(fProbes);
if (AFD.iProbes < fProbes) b = 2.f*a / (float)(AFD.iProbes + 1);
AFD.majrad = a/ff;
AFD.minrad = b/ff;