1 #ifndef SEEN_LIBNR_IN_SVG_PLANE_H
2 #define SEEN_LIBNR_IN_SVG_PLANE_H
4 #include "libnr/nr-point-fns.h"
7 /**
8 * Returns true iff the coordinates of \a p are finite, non-NaN, and "small enough". Currently we
9 * use the magic number 1e18 for determining "small enough", as this number has in the past been
10 * used in sodipodi code as a sort of "infinity" value.
11 *
12 * For SVG Tiny output, we might choose a smaller value corresponding to the range of valid numbers
13 * in SVG Tiny (which uses fixed-point arithmetic).
14 */
15 inline bool
16 in_svg_plane(NR::Point const p)
17 {
18 return NR::LInfty(p) < 1e18;
19 }
22 #endif /* !SEEN_LIBNR_IN_SVG_PLANE_H */
24 /*
25 Local Variables:
26 mode:c++
27 c-file-style:"stroustrup"
28 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
29 indent-tabs-mode:nil
30 fill-column:99
31 End:
32 */
33 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :