From: Erlend Aasland Date: Thu, 29 Nov 2007 23:05:12 +0000 (+0100) Subject: Get rid of is_inf(), and use std::isinf() instead. X-Git-Tag: release/2.11.36-1~56^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ba8fb0e35985c743d194b9bc7dac2c0fb8ede848;p=lilypond.git Get rid of is_inf(), and use std::isinf() instead. Define infinity_f as std::INFINITY. --- diff --git a/flower/offset.cc b/flower/offset.cc index 2d361d8407..91ff41be10 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -19,12 +19,6 @@ Offset::to_string () const } #endif -bool -is_inf (Real r) -{ - return (fabs (r) > 1e20); -} - /* free bsd fix by John Galbraith */ @@ -33,7 +27,7 @@ Offset complex_multiply (Offset z1, Offset z2) { Offset z; - if (!is_inf (z2[Y_AXIS])) + if (!isinf (z2[Y_AXIS])) { z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS] * z2[Y_AXIS]; z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS]; diff --git a/flower/real.cc b/flower/real.cc index 9d880ac929..297f278531 100644 --- a/flower/real.cc +++ b/flower/real.cc @@ -3,4 +3,4 @@ #include using namespace std; -const Real infinity_f = HUGE_VAL; +const Real infinity_f = INFINITY;