1 #ifndef SEEN_NR_SCALE_OPS_H
2 #define SEEN_NR_SCALE_OPS_H
4 #include <libnr/nr-scale.h>
6 namespace NR {
8 inline Point operator*(Point const &p, scale const &s)
9 {
10 return Point(p[X] * s[X],
11 p[Y] * s[Y]);
12 }
14 inline scale operator*(scale const &a, scale const &b)
15 {
16 return scale(a[X] * b[X],
17 a[Y] * b[Y]);
18 }
20 inline scale operator/(scale const &numer, scale const &denom)
21 {
22 return scale(numer[X] / denom[X],
23 numer[Y] / denom[Y]);
24 }
26 } /* namespace NR */
29 #endif /* !SEEN_NR_SCALE_OPS_H */
31 /*
32 Local Variables:
33 mode:c++
34 c-file-style:"stroustrup"
35 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
36 indent-tabs-mode:nil
37 fill-column:99
38 End:
39 */
40 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :