Code

Extensions. XAML export improvements.
[inkscape.git] / src / libnr / nr-matrix-ops.h
1 /* operator functions for NR::Matrix. */
2 #ifndef SEEN_NR_MATRIX_OPS_H
3 #define SEEN_NR_MATRIX_OPS_H
5 #include <libnr/nr-matrix.h>
7 namespace NR {
9 inline bool operator==(Matrix const &a, Matrix const &b)
10 {
11     for(unsigned i = 0; i < 6; ++i) {
12         if ( a[i] != b[i] ) {
13             return false;
14         }
15     }
16     return true;
17 }
19 inline bool operator!=(Matrix const &a, Matrix const &b)
20 {
21     return !( a == b );
22 }
24 Matrix operator*(Matrix const &a, Matrix const &b);
26 inline Matrix &operator*=(Matrix &a, Matrix const &b) { a = a * b; return a; }
28 } /* namespace NR */
30 #endif /* !SEEN_NR_MATRIX_OPS_H */
32 /*
33   Local Variables:
34   mode:c++
35   c-file-style:"stroustrup"
36   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
37   indent-tabs-mode:nil
38   fill-column:99
39   End:
40 */
41 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :