summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2013-08-29 14:48:30 (GMT)
committerjoye <joye>2013-08-29 14:48:30 (GMT)
commit2f8af562fa845d6cab155d0381826ffd2ba5f49a (patch)
tree08ad93966514d7dd6c6b0fc2e758d2c8d1359c13 /src
parent29b79ddc6fe85c653e5a200c52943a0615992382 (diff)
downloadblt-2f8af562fa845d6cab155d0381826ffd2ba5f49a.zip
blt-2f8af562fa845d6cab155d0381826ffd2ba5f49a.tar.gz
blt-2f8af562fa845d6cab155d0381826ffd2ba5f49a.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrAxis.C54
-rw-r--r--src/bltGrElemBar.C8
-rw-r--r--src/bltGrElemLine.C12
-rw-r--r--src/bltGrElemOp.C6
-rw-r--r--src/bltVecMath.C4
5 files changed, 42 insertions, 42 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index 56f5769..07b7fa2 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -695,7 +695,7 @@ LimitToObjProc(
double limit = *(double *)(widgRec + offset);
Tcl_Obj *objPtr;
- if (DEFINED(limit)) {
+ if (isnormal(limit)) {
objPtr = Tcl_NewDoubleObj(limit);
} else {
objPtr = Tcl_NewStringObj("", -1);
@@ -1331,28 +1331,28 @@ FixAxisRange(Axis *axisPtr)
/* Check the requested axis limits. Can't allow -min to be greater
* than -max, or have undefined log scale limits. */
- if (((DEFINED(axisPtr->reqMin)) && (DEFINED(axisPtr->reqMax))) &&
+ if (((isnormal(axisPtr->reqMin)) && (isnormal(axisPtr->reqMax))) &&
(axisPtr->reqMin >= axisPtr->reqMax)) {
axisPtr->reqMin = axisPtr->reqMax = Blt_NaN();
}
if (axisPtr->logScale) {
- if ((DEFINED(axisPtr->reqMin)) && (axisPtr->reqMin <= 0.0)) {
+ if ((isnormal(axisPtr->reqMin)) && (axisPtr->reqMin <= 0.0)) {
axisPtr->reqMin = Blt_NaN();
}
- if ((DEFINED(axisPtr->reqMax)) && (axisPtr->reqMax <= 0.0)) {
+ if ((isnormal(axisPtr->reqMax)) && (axisPtr->reqMax <= 0.0)) {
axisPtr->reqMax = Blt_NaN();
}
}
if (min == DBL_MAX) {
- if (DEFINED(axisPtr->reqMin)) {
+ if (isnormal(axisPtr->reqMin)) {
min = axisPtr->reqMin;
} else {
min = (axisPtr->logScale) ? 0.001 : 0.0;
}
}
if (max == -DBL_MAX) {
- if (DEFINED(axisPtr->reqMax)) {
+ if (isnormal(axisPtr->reqMax)) {
max = axisPtr->reqMax;
} else {
max = 1.0;
@@ -1377,10 +1377,10 @@ FixAxisRange(Axis *axisPtr)
*/
axisPtr->min = min;
axisPtr->max = max;
- if (DEFINED(axisPtr->reqMin)) {
+ if (isnormal(axisPtr->reqMin)) {
axisPtr->min = axisPtr->reqMin;
}
- if (DEFINED(axisPtr->reqMax)) {
+ if (isnormal(axisPtr->reqMax)) {
axisPtr->max = axisPtr->reqMax;
}
if (axisPtr->max < axisPtr->min) {
@@ -1390,10 +1390,10 @@ FixAxisRange(Axis *axisPtr)
* (based upon the data) is too small or large. Remedy this by making
* up a new min or max from the user-defined limit.
*/
- if (!DEFINED(axisPtr->reqMin)) {
+ if (!isnormal(axisPtr->reqMin)) {
axisPtr->min = axisPtr->max - (fabs(axisPtr->max) * 0.1);
}
- if (!DEFINED(axisPtr->reqMax)) {
+ if (!isnormal(axisPtr->reqMax)) {
axisPtr->max = axisPtr->min + (fabs(axisPtr->max) * 0.1);
}
}
@@ -1402,7 +1402,7 @@ FixAxisRange(Axis *axisPtr)
* limits.
*/
if ((axisPtr->windowSize > 0.0) &&
- (!DEFINED(axisPtr->reqMin)) && (!DEFINED(axisPtr->reqMax))) {
+ (!isnormal(axisPtr->reqMin)) && (!isnormal(axisPtr->reqMax))) {
if (axisPtr->shiftBy < 0.0) {
axisPtr->shiftBy = 0.0;
}
@@ -1637,13 +1637,13 @@ LogScaleAxis(Axis *axisPtr, double min, double max)
}
if ((axisPtr->looseMin == AXIS_TIGHT) ||
((axisPtr->looseMin == AXIS_LOOSE) &&
- (DEFINED(axisPtr->reqMin)))) {
+ (isnormal(axisPtr->reqMin)))) {
tickMin = min;
nMajor++;
}
if ((axisPtr->looseMax == AXIS_TIGHT) ||
((axisPtr->looseMax == AXIS_LOOSE) &&
- (DEFINED(axisPtr->reqMax)))) {
+ (isnormal(axisPtr->reqMax)))) {
tickMax = max;
}
}
@@ -1766,12 +1766,12 @@ LinearScaleAxis(Axis *axisPtr, double min, double max)
*/
if ((axisPtr->looseMin == AXIS_TIGHT) ||
((axisPtr->looseMin == AXIS_LOOSE) &&
- (DEFINED(axisPtr->reqMin)))) {
+ (isnormal(axisPtr->reqMin)))) {
axisMin = min;
}
if ((axisPtr->looseMax == AXIS_TIGHT) ||
((axisPtr->looseMax == AXIS_LOOSE) &&
- (DEFINED(axisPtr->reqMax)))) {
+ (isnormal(axisPtr->reqMax)))) {
axisMax = max;
}
SetAxisRange(&axisPtr->axisRange, axisMin, axisMax);
@@ -1883,10 +1883,10 @@ Blt_ResetAxes(Graph *graphPtr)
/* Calculate min/max tick (major/minor) layouts */
min = axisPtr->min;
max = axisPtr->max;
- if ((DEFINED(axisPtr->scrollMin)) && (min < axisPtr->scrollMin)) {
+ if ((isnormal(axisPtr->scrollMin)) && (min < axisPtr->scrollMin)) {
min = axisPtr->scrollMin;
}
- if ((DEFINED(axisPtr->scrollMax)) && (max > axisPtr->scrollMax)) {
+ if ((isnormal(axisPtr->scrollMax)) && (max > axisPtr->scrollMax)) {
max = axisPtr->scrollMax;
}
if (axisPtr->logScale) {
@@ -2789,10 +2789,10 @@ DrawAxis(Axis *axisPtr, Drawable drawable)
worldMin = axisPtr->valueRange.min;
worldMax = axisPtr->valueRange.max;
- if (DEFINED(axisPtr->scrollMin)) {
+ if (isnormal(axisPtr->scrollMin)) {
worldMin = axisPtr->scrollMin;
}
- if (DEFINED(axisPtr->scrollMax)) {
+ if (isnormal(axisPtr->scrollMax)) {
worldMax = axisPtr->scrollMax;
}
viewMin = axisPtr->min;
@@ -3704,7 +3704,7 @@ ConfigureAxis(Axis *axisPtr)
/* Check the requested axis limits. Can't allow -min to be greater than
* -max. Do this regardless of -checklimits option. We want to always
* detect when the user has zoomed in beyond the precision of the data.*/
- if (((DEFINED(axisPtr->reqMin)) && (DEFINED(axisPtr->reqMax))) &&
+ if (((isnormal(axisPtr->reqMin)) && (isnormal(axisPtr->reqMax))) &&
(axisPtr->reqMin >= axisPtr->reqMax)) {
char msg[200];
sprintf_s(msg, 200,
@@ -3718,7 +3718,7 @@ ConfigureAxis(Axis *axisPtr)
if (axisPtr->logScale) {
if (axisPtr->flags & AXIS_CHECK_LIMITS) {
/* Check that the logscale limits are positive. */
- if ((DEFINED(axisPtr->reqMin)) && (axisPtr->reqMin <= 0.0)) {
+ if ((isnormal(axisPtr->reqMin)) && (axisPtr->reqMin <= 0.0)) {
Tcl_AppendResult(graphPtr->interp,"bad logscale -min limit \"",
Blt_Dtoa(graphPtr->interp, axisPtr->reqMin),
"\" for axis \"", axisPtr->obj.name, "\"",
@@ -3726,10 +3726,10 @@ ConfigureAxis(Axis *axisPtr)
return TCL_ERROR;
}
}
- if ((DEFINED(axisPtr->scrollMin)) && (axisPtr->scrollMin <= 0.0)) {
+ if ((isnormal(axisPtr->scrollMin)) && (axisPtr->scrollMin <= 0.0)) {
axisPtr->scrollMin = Blt_NaN();
}
- if ((DEFINED(axisPtr->scrollMax)) && (axisPtr->scrollMax <= 0.0)) {
+ if ((isnormal(axisPtr->scrollMax)) && (axisPtr->scrollMax <= 0.0)) {
axisPtr->scrollMax = Blt_NaN();
}
}
@@ -4405,10 +4405,10 @@ ViewOp(Tcl_Interp *interp, Axis *axisPtr, int objc, Tcl_Obj *const *objv)
worldMin = axisPtr->valueRange.min;
worldMax = axisPtr->valueRange.max;
/* Override data dimensions with user-selected limits. */
- if (DEFINED(axisPtr->scrollMin)) {
+ if (isnormal(axisPtr->scrollMin)) {
worldMin = axisPtr->scrollMin;
}
- if (DEFINED(axisPtr->scrollMax)) {
+ if (isnormal(axisPtr->scrollMax)) {
worldMax = axisPtr->scrollMax;
}
viewMin = axisPtr->min;
@@ -5673,12 +5673,12 @@ TimeScaleAxis(Axis *axisPtr, double min, double max)
*/
if ((axisPtr->looseMin == AXIS_TIGHT) ||
((axisPtr->looseMin == AXIS_LOOSE) &&
- (DEFINED(axisPtr->reqMin)))) {
+ (isnormal(axisPtr->reqMin)))) {
axisMin = min;
}
if ((axisPtr->looseMax == AXIS_TIGHT) ||
((axisPtr->looseMax == AXIS_LOOSE) &&
- (DEFINED(axisPtr->reqMax)))) {
+ (isnormal(axisPtr->reqMax)))) {
axisMax = max;
}
SetAxisRange(&axisPtr->axisRange, axisMin, axisMax);
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index 83974ac..00ed1dc 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -1285,7 +1285,7 @@ MapErrorBars(Graph *graphPtr, BarElement *elemPtr, BarStyle **dataToStyle)
x = elemPtr->x.values[i];
y = elemPtr->y.values[i];
stylePtr = dataToStyle[i];
- if ((FINITE(x)) && (FINITE(y))) {
+ if ((isfinite(x)) && (isfinite(y))) {
if (elemPtr->xError.nValues > 0) {
high = x + elemPtr->xError.values[i];
low = x - elemPtr->xError.values[i];
@@ -1293,7 +1293,7 @@ MapErrorBars(Graph *graphPtr, BarElement *elemPtr, BarStyle **dataToStyle)
high = elemPtr->xHigh.values[i];
low = elemPtr->xLow.values[i];
}
- if ((FINITE(high)) && (FINITE(low))) {
+ if ((isfinite(high)) && (isfinite(low))) {
Point2d p, q;
p = Blt_Map2D(graphPtr, high, y, &elemPtr->axes);
@@ -1349,7 +1349,7 @@ MapErrorBars(Graph *graphPtr, BarElement *elemPtr, BarStyle **dataToStyle)
x = elemPtr->x.values[i];
y = elemPtr->y.values[i];
stylePtr = dataToStyle[i];
- if ((FINITE(x)) && (FINITE(y))) {
+ if ((isfinite(x)) && (isfinite(y))) {
if (elemPtr->yError.nValues > 0) {
high = y + elemPtr->yError.values[i];
low = y - elemPtr->yError.values[i];
@@ -1357,7 +1357,7 @@ MapErrorBars(Graph *graphPtr, BarElement *elemPtr, BarStyle **dataToStyle)
high = elemPtr->yHigh.values[i];
low = elemPtr->yLow.values[i];
}
- if ((FINITE(high)) && (FINITE(low))) {
+ if ((isfinite(high)) && (isfinite(low))) {
Point2d p, q;
p = Blt_Map2D(graphPtr, x, high, &elemPtr->axes);
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C
index dbac1e5..4d0835f 100644
--- a/src/bltGrElemLine.C
+++ b/src/bltGrElemLine.C
@@ -1558,7 +1558,7 @@ GetScreenPoints(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
count = 0; /* Count the valid screen coordinates */
if (graphPtr->inverted) {
for (i = 0; i < np; i++) {
- if ((FINITE(x[i])) && (FINITE(y[i]))) {
+ if ((isfinite(x[i])) && (isfinite(y[i]))) {
points[count].x = Blt_HMap(elemPtr->axes.y, y[i]);
points[count].y = Blt_VMap(elemPtr->axes.x, x[i]);
map[count] = i;
@@ -1567,7 +1567,7 @@ GetScreenPoints(Graph *graphPtr, LineElement *elemPtr, MapInfo *mapPtr)
}
} else {
for (i = 0; i < np; i++) {
- if ((FINITE(x[i])) && (FINITE(y[i]))) {
+ if ((isfinite(x[i])) && (isfinite(y[i]))) {
points[count].x = Blt_HMap(elemPtr->axes.x, x[i]);
points[count].y = Blt_VMap(elemPtr->axes.y, y[i]);
map[count] = i;
@@ -2672,7 +2672,7 @@ MapErrorBars(Graph *graphPtr, LineElement *elemPtr, LineStyle **styleMap)
x = elemPtr->x.values[i];
y = elemPtr->y.values[i];
stylePtr = styleMap[i];
- if ((FINITE(x)) && (FINITE(y))) {
+ if ((isfinite(x)) && (isfinite(y))) {
if (elemPtr->xError.nValues > 0) {
high = x + elemPtr->xError.values[i];
low = x - elemPtr->xError.values[i];
@@ -2680,7 +2680,7 @@ MapErrorBars(Graph *graphPtr, LineElement *elemPtr, LineStyle **styleMap)
high = elemPtr->xHigh.values[i];
low = elemPtr->xLow.values[i];
}
- if ((FINITE(high)) && (FINITE(low))) {
+ if ((isfinite(high)) && (isfinite(low))) {
Point2d p, q;
p = Blt_Map2D(graphPtr, high, y, &elemPtr->axes);
@@ -2736,7 +2736,7 @@ MapErrorBars(Graph *graphPtr, LineElement *elemPtr, LineStyle **styleMap)
x = elemPtr->x.values[i];
y = elemPtr->y.values[i];
stylePtr = styleMap[i];
- if ((FINITE(x)) && (FINITE(y))) {
+ if ((isfinite(x)) && (isfinite(y))) {
if (elemPtr->yError.nValues > 0) {
high = y + elemPtr->yError.values[i];
low = y - elemPtr->yError.values[i];
@@ -2744,7 +2744,7 @@ MapErrorBars(Graph *graphPtr, LineElement *elemPtr, LineStyle **styleMap)
high = elemPtr->yHigh.values[i];
low = elemPtr->yLow.values[i];
}
- if ((FINITE(high)) && (FINITE(low))) {
+ if ((isfinite(high)) && (isfinite(low))) {
Point2d p, q;
p = Blt_Map2D(graphPtr, x, high, &elemPtr->axes);
diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C
index c6886ea..1aefb6a 100644
--- a/src/bltGrElemOp.C
+++ b/src/bltGrElemOp.C
@@ -281,7 +281,7 @@ FetchTableValues(Tcl_Interp *interp, ElemValues *valuesPtr, Blt_TableColumn col)
row = Blt_Table_FindRowByIndex(table, i);
value = Blt_Table_GetDouble(table, row, col);
- if (FINITE(value)) {
+ if (isfinite(value)) {
array[j] = value;
j++;
}
@@ -536,14 +536,14 @@ FindRange(ElemValues *valuesPtr)
min = DBL_MAX, max = -DBL_MAX;
for(i = 0; i < valuesPtr->nValues; i++) {
- if (FINITE(x[i])) {
+ if (isfinite(x[i])) {
min = max = x[i];
break;
}
}
/* Initialize values to track the vector range */
for (/* empty */; i < valuesPtr->nValues; i++) {
- if (FINITE(x[i])) {
+ if (isfinite(x[i])) {
if (x[i] < min) {
min = x[i];
} else if (x[i] > max) {
diff --git a/src/bltVecMath.C b/src/bltVecMath.C
index 2638667..abc6812 100644
--- a/src/bltVecMath.C
+++ b/src/bltVecMath.C
@@ -1646,7 +1646,7 @@ EvaluateExpression(
/* Check for NaN's and overflows. */
for (vp = vPtr->valueArr, vend = vp + vPtr->length; vp < vend; vp++) {
- if (!FINITE(*vp)) {
+ if (!isfinite(*vp)) {
/*
* IEEE floating-point error.
*/
@@ -1694,7 +1694,7 @@ ComponentFunc(
MathError(interp, *vp);
return TCL_ERROR;
}
- if (!FINITE(*vp)) {
+ if (!isfinite(*vp)) {
/*
* IEEE floating-point error.
*/