remove MAXFLOAT define
This commit is contained in:
@@ -2638,7 +2638,7 @@ static void sph_particle_courant(SPHData *sphdata, SPHRangeData *pfr)
|
|||||||
mul_v3_v3fl(sphdata->flow, flow, 1.0f / pfr->tot_neighbors);
|
mul_v3_v3fl(sphdata->flow, flow, 1.0f / pfr->tot_neighbors);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sphdata->element_size = MAXFLOAT;
|
sphdata->element_size = FLT_MAX;
|
||||||
copy_v3_v3(sphdata->flow, flow);
|
copy_v3_v3(sphdata->flow, flow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -75,11 +75,6 @@
|
|||||||
#define M_LN10 2.30258509299404568402
|
#define M_LN10 2.30258509299404568402
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* non-standard defines, used in some places */
|
|
||||||
#ifndef MAXFLOAT
|
|
||||||
#define MAXFLOAT ((float)3.40282347e+38)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
# define NAN_FLT __builtin_nanf("")
|
# define NAN_FLT __builtin_nanf("")
|
||||||
#else
|
#else
|
||||||
|
@@ -34,7 +34,7 @@ ChunkOrder::ChunkOrder()
|
|||||||
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots)
|
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots)
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
double distance = MAXFLOAT;
|
double distance = FLT_MAX;
|
||||||
for (index = 0; index < numberOfHotspots; index++) {
|
for (index = 0; index < numberOfHotspots; index++) {
|
||||||
ChunkOrderHotspot *hotspot = hotspots[index];
|
ChunkOrderHotspot *hotspot = hotspots[index];
|
||||||
double ndistance = hotspot->determineDistance(this->m_x, this->m_y);
|
double ndistance = hotspot->determineDistance(this->m_x, this->m_y);
|
||||||
|
@@ -371,7 +371,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
|
|||||||
float *rectf = result->buffer;
|
float *rectf = result->buffer;
|
||||||
|
|
||||||
// temp holds maxima for every step in the algorithm, buf holds a
|
// 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.
|
// simplify the logic.
|
||||||
float *temp = (float *)MEM_mallocN(sizeof(float) * (2 * window - 1), "dilate erode temp");
|
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");
|
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
|
// first pass, horizontal dilate/erode
|
||||||
for (y = ymin; y < ymax; y++) {
|
for (y = ymin; y < ymax; y++) {
|
||||||
for (x = 0; x < bwidth + 5 * half_window; x++) {
|
for (x = 0; x < bwidth + 5 * half_window; x++) {
|
||||||
buf[x] = -MAXFLOAT;
|
buf[x] = -FLT_MAX;
|
||||||
}
|
}
|
||||||
for (x = xmin; x < xmax; ++x) {
|
for (x = xmin; x < xmax; ++x) {
|
||||||
buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + 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
|
// second pass, vertical dilate/erode
|
||||||
for (x = 0; x < bwidth; x++) {
|
for (x = 0; x < bwidth; x++) {
|
||||||
for (y = 0; y < bheight + 5 * half_window; y++) {
|
for (y = 0; y < bheight + 5 * half_window; y++) {
|
||||||
buf[y] = -MAXFLOAT;
|
buf[y] = -FLT_MAX;
|
||||||
}
|
}
|
||||||
for (y = ymin; y < ymax; y++) {
|
for (y = ymin; y < ymax; y++) {
|
||||||
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
|
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
|
||||||
@@ -498,7 +498,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
|
|||||||
float *rectf = result->buffer;
|
float *rectf = result->buffer;
|
||||||
|
|
||||||
// temp holds maxima for every step in the algorithm, buf holds a
|
// 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.
|
// simplify the logic.
|
||||||
float *temp = (float *)MEM_mallocN(sizeof(float) * (2 * window - 1), "dilate erode temp");
|
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");
|
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
|
// first pass, horizontal dilate/erode
|
||||||
for (y = ymin; y < ymax; y++) {
|
for (y = ymin; y < ymax; y++) {
|
||||||
for (x = 0; x < bwidth + 5 * half_window; x++) {
|
for (x = 0; x < bwidth + 5 * half_window; x++) {
|
||||||
buf[x] = MAXFLOAT;
|
buf[x] = FLT_MAX;
|
||||||
}
|
}
|
||||||
for (x = xmin; x < xmax; ++x) {
|
for (x = xmin; x < xmax; ++x) {
|
||||||
buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + 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
|
// second pass, vertical dilate/erode
|
||||||
for (x = 0; x < bwidth; x++) {
|
for (x = 0; x < bwidth; x++) {
|
||||||
for (y = 0; y < bheight + 5 * half_window; y++) {
|
for (y = 0; y < bheight + 5 * half_window; y++) {
|
||||||
buf[y] = MAXFLOAT;
|
buf[y] = FLT_MAX;
|
||||||
}
|
}
|
||||||
for (y = ymin; y < ymax; y++) {
|
for (y = ymin; y < ymax; y++) {
|
||||||
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
|
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
|
||||||
|
@@ -3262,7 +3262,7 @@ static void rna_def_bake_data(BlenderRNA *brna)
|
|||||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "cage_extrusion", PROP_FLOAT, PROP_NONE);
|
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_range(prop, 0.0, 1.0, 1, 3);
|
||||||
RNA_def_property_ui_text(prop, "Cage Extrusion",
|
RNA_def_property_ui_text(prop, "Cage Extrusion",
|
||||||
"Distance to use for the inward ray cast when using selected to active");
|
"Distance to use for the inward ray cast when using selected to active");
|
||||||
|
Reference in New Issue
Block a user