lemon/math.h
changeset 1054 c40a9d94442d
parent 877 141f9c0db4a3
child 1092 dceba191c00d
     1.1 --- a/lemon/math.h	Sun May 06 17:18:39 2012 +0200
     1.2 +++ b/lemon/math.h	Tue Jun 05 12:06:28 2012 +0200
     1.3 @@ -65,8 +65,13 @@
     1.4        return v!=v;
     1.5      }
     1.6  
     1.7 +  ///Round a value to its closest integer
     1.8 +  inline double round(double r) {
     1.9 +    return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
    1.10 +  }
    1.11 +
    1.12    /// @}
    1.13  
    1.14  } //namespace lemon
    1.15  
    1.16 -#endif //LEMON_TOLERANCE_H
    1.17 +#endif //LEMON_MATH_H