Code

Use subdirectories with icon sizes.
[inkscape.git] / src / round.h
1 #ifndef SEEN_ROUND_H
2 #define SEEN_ROUND_H
4 #include <cmath>
6 namespace Inkscape {
8 /** Returns x rounded to the nearest integer.  It is unspecified what happens
9     if x is half way between two integers: we may in future use rint/round
10     on platforms that have them.  If you depend on a particular rounding
11     behaviour, then please change this documentation accordingly.
12 **/
13 inline double
14 round(double const x)
15 {
16     return std::floor( x + .5 );
17 }
19 }
21 #endif /* !SEEN_ROUND_H */
23 /*
24   Local Variables:
25   mode:c++
26   c-file-style:"stroustrup"
27   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
28   indent-tabs-mode:nil
29   fill-column:99
30   End:
31 */
32 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :