1 #ifndef SEEN_NR_ROTATE_OPS_H
2 #define SEEN_NR_ROTATE_OPS_H
3 #include <libnr/nr-rotate.h>
5 namespace NR {
7 inline Point operator*(Point const &v, rotate const &r)
8 {
9 return Point(r.vec[X] * v[X] - r.vec[Y] * v[Y],
10 r.vec[Y] * v[X] + r.vec[X] * v[Y]);
11 }
13 inline rotate operator*(rotate const &a, rotate const &b)
14 {
15 return rotate( a.vec * b );
16 }
18 inline rotate &rotate::operator*=(rotate const &b)
19 {
20 *this = *this * b;
21 return *this;
22 }
24 inline rotate operator/(rotate const &numer, rotate const &denom)
25 {
26 return numer * denom.inverse();
27 }
29 } /* namespace NR */
32 #endif /* !SEEN_NR_ROTATE_OPS_H */
34 /*
35 Local Variables:
36 mode:c++
37 c-file-style:"stroustrup"
38 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
39 indent-tabs-mode:nil
40 fill-column:99
41 End:
42 */
43 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :