Use isnan(3) to check for NaN
This commit is contained in:
@@ -125,7 +125,7 @@ void print_number_0(const char *str, float number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void print_number_nan(const char *str, float number) {
|
void print_number_nan(const char *str, float number) {
|
||||||
if (number == number) {
|
if (!isnan(number)) {
|
||||||
printf("%s: %g, ", str, number);
|
printf("%s: %g, ", str, number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,7 @@ int dim[2] = {
|
|||||||
|
|
||||||
|
|
||||||
bool isUndefined(float value) {
|
bool isUndefined(float value) {
|
||||||
return value != value; // NaN check
|
return isnan(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
float getMargin(css_node_t *node, int location) {
|
float getMargin(css_node_t *node, int location) {
|
||||||
|
Reference in New Issue
Block a user