4 void c_thresh(DCELL * result, DCELL * values,
int n,
const void *closure)
7 double tval = *(
const double *)closure;
8 double epsilon = GRASS_EPSILON;
14 for (i = 0; i <
n; i++) {
22 G_debug(2,
"values[%d] %f, tval %f", i, values[i], tval);
25 if (fabs(tval - values[i]) < epsilon ) {
28 G_debug(2,
"values[%d] %f, thresh %f, threshx %f, diff %f", i, values[i], thresh, threshx, tval - values[i]);
void G_set_d_null_value(DCELL *dcellVals, int numVals)
int G_is_d_null_value(const DCELL *dcellVal)
Returns 1 if dcell is NULL, 0 otherwise. This will test if the value dcell is a NaN. Same test as in G_is_f_null_value().
int G_debug(int level, const char *msg,...)
Print debugging message.
void c_thresh(DCELL *result, DCELL *values, int n, const void *closure)