From aea9a4ef6bee5b259118ceed660349e30dfdc285 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Mon, 1 Apr 2019 22:30:31 +0200 Subject: Replace IS_NAN with std::isnan (exists since C++11) --- src/ui/tools/calligraphic-tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/tools/calligraphic-tool.cpp') diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp index ffe1ca46c..37a4a24f0 100644 --- a/src/ui/tools/calligraphic-tool.cpp +++ b/src/ui/tools/calligraphic-tool.cpp @@ -623,7 +623,7 @@ bool CalligraphicTool::root_handler(GdkEvent* event) { // so _gradually_ let go attraction to prevent jerks target = (this->hatch_spacing * speed + hatch_dist * (SPEED_NORMAL - speed))/SPEED_NORMAL; } - if (!IS_NAN(dot) && dot < -0.5) {// flip + if (!std::isnan(dot) && dot < -0.5) {// flip target = -target; } @@ -708,7 +708,7 @@ bool CalligraphicTool::root_handler(GdkEvent* event) { } else { // Not drawing but spacing set: gray, center snapped, fixed radius Geom::Point c = (nearest + this->hatch_spacing * hatch_unit_vector) * motion_to_curve.inverse(); - if (!IS_NAN(c[Geom::X]) && !IS_NAN(c[Geom::Y])) { + if (!std::isnan(c[Geom::X]) && !std::isnan(c[Geom::Y])) { Geom::Affine const sm (Geom::Scale(this->hatch_spacing, this->hatch_spacing) * Geom::Translate(c)); sp_canvas_item_affine_absolute(this->hatch_area, sm); sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(this->hatch_area), 0x7f7f7fff, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); -- cgit v1.2.3