[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12410] trunk/blender/source/blender/nodes /intern/CMP_util.c: Replace ceilf()/floorf() with ceil()/floor() to fix VC7 compilation problems
Ken Hughes
khughes at pacific.edu
Fri Oct 26 22:04:04 CEST 2007
Revision: 12410
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12410
Author: khughes
Date: 2007-10-26 22:04:04 +0200 (Fri, 26 Oct 2007)
Log Message:
-----------
Replace ceilf()/floorf() with ceil()/floor() to fix VC7 compilation problems
reported by Stephane Soppera.
Modified Paths:
--------------
trunk/blender/source/blender/nodes/intern/CMP_util.c
Modified: trunk/blender/source/blender/nodes/intern/CMP_util.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_util.c 2007-10-26 19:53:55 UTC (rev 12409)
+++ trunk/blender/source/blender/nodes/intern/CMP_util.c 2007-10-26 20:04:04 UTC (rev 12410)
@@ -962,7 +962,7 @@
// bilinear interpolation with wraparound
void qd_getPixelLerpWrap(CompBuf* src, float u, float v, float* col)
{
- const float ufl = floorf(u), vfl = floorf(v);
+ const float ufl = floor(u), vfl = floor(v);
const int nx = (int)ufl % src->x, ny = (int)vfl % src->y;
const int x1 = (nx < 0) ? (nx + src->x) : nx;
const int y1 = (ny < 0) ? (ny + src->y) : ny;
@@ -984,9 +984,9 @@
// as above, without wrap around
void qd_getPixelLerp(CompBuf* src, float u, float v, float* col)
{
- const float ufl = floorf(u), vfl = floorf(v);
+ const float ufl = floor(u), vfl = floor(v);
const int x1 = (int)ufl, y1 = (int)vfl;
- const int x2 = (int)ceilf(u), y2 = (int)ceilf(v);
+ const int x2 = (int)ceil(u), y2 = (int)ceil(v);
if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) {
const float B[4] = {0,0,0,0};
const int ox1 = (x1 < 0), oy1 = (y1 < 0), ox2 = (x2 >= src->x), oy2 = (y2 >= src->y);
@@ -1009,9 +1009,9 @@
// as above, sampling only one channel
void qd_getPixelLerpChan(CompBuf* src, float u, float v, int chan, float* out)
{
- const float ufl = floorf(u), vfl = floorf(v);
+ const float ufl = floor(u), vfl = floor(v);
const int x1 = (int)ufl, y1 = (int)vfl;
- const int x2 = (int)ceilf(u), y2 = (int)ceilf(v);
+ const int x2 = (int)ceil(u), y2 = (int)ceil(v);
if (chan >= src->type) chan = 0;
if ((x2 >= 0) && (y2 >= 0) && (x1 < src->x) && (y1 < src->y)) {
const float B[4] = {0,0,0,0};
More information about the Bf-blender-cvs
mailing list