Arc a (b.p0, b.p3, b.point (mid_t), false);
Arc orig_a = a;
- if (isfinite (max_d)) {
+ if (std::isfinite (max_d)) {
assert (max_d >= 0);
if (fabs (a.d) > max_d)
a.d = a.d < 0 ? -max_d : max_d;
}
if (d_bits && max_d != 0) {
- assert (isfinite (max_d));
+ assert (std::isfinite (max_d));
assert (fabs (a.d) <= max_d);
int mult = (1 << (d_bits - 1)) - 1;
int id = round (a.d / max_d * mult);
assert (ix <= MAX_X);
assert (iy <= MAX_Y);
unsigned int id;
- if (isinf (d))
+ if (std::isinf (d))
id = 0;
else {
assert (fabs (d) <= GLYPHY_MAX_D);
/* If the arclist is two arcs that can be combined in encoding if reordered,
* do that. */
if (near_endpoints.size () == 4 &&
- isinf (near_endpoints[2].d) &&
+ std::isinf (near_endpoints[2].d) &&
near_endpoints[0].p.x == near_endpoints[3].p.x &&
near_endpoints[0].p.y == near_endpoints[3].p.y)
{
#include "glyphy.h"
-#include <math.h>
+#include <cmath>
#include <string.h>
#include <assert.h>
#include <stdio.h>
glyphy_bool_t
glyphy_extents_is_empty (const glyphy_extents_t *extents)
{
- return isinf (extents->min_x);
+ return std::isinf (extents->min_x);
}
void
}
inline bool Point::is_finite (void) const {
- return isfinite (x) && isfinite (y);
+ return std::isfinite (x) && std::isfinite (y);
}
inline const Point Point::lerp (const double &a, const Point &p) const {
/* The following two cases are special-cased to get better floating