lemon/math.h
changeset 1208 c6aa2cc1af04
parent 1092 dceba191c00d
equal deleted inserted replaced
7:1905c844b7e0 8: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