lemon/math.h
changeset 1433 a278d16bd2d0
parent 1270 dceba191c00d
equal deleted inserted replaced
8:1905c844b7e0 9:17efb28dc3d9
    65       return v!=v;
    65       return v!=v;
    66     }
    66     }
    67 
    67 
    68   ///Round a value to its closest integer
    68   ///Round a value to its closest integer
    69   inline double round(double r) {
    69   inline double round(double r) {
    70     return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
    70     return (r > 0.0) ? std::floor(r + 0.5) : std::ceil(r - 0.5);
    71   }
    71   }
    72 
    72 
    73   /// @}
    73   /// @}
    74 
    74 
    75 } //namespace lemon
    75 } //namespace lemon