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-08-14 04:36:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-14 04:36:07 +0400
commit28054d8e386dbaee80d439fdf9c7ba7eb6bfe39f (patch)
treee5efaafa0cfb14b2d16b24b01ff5b70d533e4623 /source/blender
parent14d9e469779ef63ed395b3e3339d416a3192b820 (diff)
remove MAXFLOAT define
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c2
-rw-r--r--source/blender/blenlib/BLI_math_base.h5
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrder.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp12
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
5 files changed, 9 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index cde6d022d49..e32b46f4b73 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2638,7 +2638,7 @@ static void sph_particle_courant(SPHData *sphdata, SPHRangeData *pfr)
mul_v3_v3fl(sphdata->flow, flow, 1.0f / pfr->tot_neighbors);
}
else {
- sphdata->element_size = MAXFLOAT;
+ sphdata->element_size = FLT_MAX;
copy_v3_v3(sphdata->flow, flow);
}
}
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index b639df4da84..5f94f04e0a8 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -75,11 +75,6 @@
#define M_LN10 2.30258509299404568402
#endif
-/* non-standard defines, used in some places */
-#ifndef MAXFLOAT
-#define MAXFLOAT ((float)3.40282347e+38)
-#endif
-
#if defined(__GNUC__)
# define NAN_FLT __builtin_nanf("")
#else
diff --git a/source/blender/compositor/intern/COM_ChunkOrder.cpp b/source/blender/compositor/intern/COM_ChunkOrder.cpp
index 1b7c435ecea..3b094609a26 100644
--- a/source/blender/compositor/intern/COM_ChunkOrder.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrder.cpp
@@ -34,7 +34,7 @@ ChunkOrder::ChunkOrder()
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots)
{
unsigned int index;
- double distance = MAXFLOAT;
+ double distance = FLT_MAX;
for (index = 0; index < numberOfHotspots; index++) {
ChunkOrderHotspot *hotspot = hotspots[index];
double ndistance = hotspot->determineDistance(this->m_x, this->m_y);
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index b54e47c136d..cbf4ce693d9 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -371,7 +371,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
float *rectf = result->buffer;
// temp holds maxima for every step in the algorithm, buf holds a
- // single row or column of input values, padded with MAXFLOATs to
+ // single row or column of input values, padded with FLT_MAX's to
// simplify the logic.
float *temp = (float *)MEM_mallocN(sizeof(float) * (2 * window - 1), "dilate erode temp");
float *buf = (float *)MEM_mallocN(sizeof(float) * (max(bwidth, bheight) + 5 * half_window), "dilate erode buf");
@@ -380,7 +380,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
// first pass, horizontal dilate/erode
for (y = ymin; y < ymax; y++) {
for (x = 0; x < bwidth + 5 * half_window; x++) {
- buf[x] = -MAXFLOAT;
+ buf[x] = -FLT_MAX;
}
for (x = xmin; x < xmax; ++x) {
buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + x)];
@@ -405,7 +405,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
// second pass, vertical dilate/erode
for (x = 0; x < bwidth; x++) {
for (y = 0; y < bheight + 5 * half_window; y++) {
- buf[y] = -MAXFLOAT;
+ buf[y] = -FLT_MAX;
}
for (y = ymin; y < ymax; y++) {
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
@@ -498,7 +498,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
float *rectf = result->buffer;
// temp holds maxima for every step in the algorithm, buf holds a
- // single row or column of input values, padded with MAXFLOATs to
+ // single row or column of input values, padded with FLT_MAX's to
// simplify the logic.
float *temp = (float *)MEM_mallocN(sizeof(float) * (2 * window - 1), "dilate erode temp");
float *buf = (float *)MEM_mallocN(sizeof(float) * (max(bwidth, bheight) + 5 * half_window), "dilate erode buf");
@@ -507,7 +507,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
// first pass, horizontal dilate/erode
for (y = ymin; y < ymax; y++) {
for (x = 0; x < bwidth + 5 * half_window; x++) {
- buf[x] = MAXFLOAT;
+ buf[x] = FLT_MAX;
}
for (x = xmin; x < xmax; ++x) {
buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + x)];
@@ -532,7 +532,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
// second pass, vertical dilate/erode
for (x = 0; x < bwidth; x++) {
for (y = 0; y < bheight + 5 * half_window; y++) {
- buf[y] = MAXFLOAT;
+ buf[y] = FLT_MAX;
}
for (y = ymin; y < ymax; y++) {
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 1c6d0fafc18..682a7f4ee31 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3262,7 +3262,7 @@ static void rna_def_bake_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "cage_extrusion", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0, MAXFLOAT);
+ RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
RNA_def_property_ui_text(prop, "Cage Extrusion",
"Distance to use for the inward ray cast when using selected to active");