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:
Diffstat (limited to 'source/blender/blenlib/intern/voronoi.c')
-rw-r--r--source/blender/blenlib/intern/voronoi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c
index 3030e54eb78..601b07c9a5d 100644
--- a/source/blender/blenlib/intern/voronoi.c
+++ b/source/blender/blenlib/intern/voronoi.c
@@ -39,7 +39,7 @@
#include "BLI_voronoi.h"
#include "BLI_utildefines.h"
-#define VORONOI_EPS 1e-2
+#define VORONOI_EPS 1e-2f
enum {
voronoiEventType_Site = 0,
@@ -259,9 +259,9 @@ static float voronoi_getXOfEdge(VoronoiProcess *process, VoronoiParabola *par, f
x2 = (-b - sqrtf(disc)) / (2 * a);
if (p[1] < r[1])
- ry = maxf(x1, x2);
+ ry = max_ff(x1, x2);
else
- ry = minf(x1, x2);
+ ry = min_ff(x1, x2);
return ry;
}
@@ -490,9 +490,9 @@ static void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabol
}
if (parabola->edge->direction[0] > 0.0f)
- mx = MAX2(process->width, parabola->edge->start[0] + 10);
+ mx = max_ff(process->width, parabola->edge->start[0] + 10);
else
- mx = MIN2(0.0, parabola->edge->start[0] - 10);
+ mx = min_ff(0.0f, parabola->edge->start[0] - 10.0f);
parabola->edge->end[0] = mx;
parabola->edge->end[1] = mx * parabola->edge->f + parabola->edge->g;
@@ -609,9 +609,9 @@ static int voronoi_getNextSideCoord(ListBase *edges, float coord[2], int dim, in
static void voronoi_createBoundaryEdges(ListBase *edges, int width, int height)
{
const float corners[4][2] = {{width - 1, 0.0f},
- {width - 1, height - 1},
- {0.0f, height - 1},
- {0.0f, 0.0f}};
+ {width - 1, height - 1},
+ {0.0f, height - 1},
+ {0.0f, 0.0f}};
int i, dim = 0, dir = 1;
float coord[2] = {0.0f, 0.0f};