~lib2geom-hackers/lib2geom/trunk

« back to all changes in this revision

Viewing changes to matrix-ops.h

  • Committer: njh
  • Date: 2006-05-22 11:50:24 UTC
  • Revision ID: svn-v4:4601daaa-0314-0410-9a8b-c964a3c23b6b:trunk/lib2geom:1
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* operator functions for Geom::Matrix. */
 
2
#ifndef SEEN_Geom_MATRIX_OPS_H
 
3
#define SEEN_Geom_MATRIX_OPS_H
 
4
 
 
5
#include "matrix.h"
 
6
 
 
7
namespace Geom {
 
8
 
 
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
}
 
18
 
 
19
inline bool operator!=(Matrix const &a, Matrix const &b)
 
20
{
 
21
    return !( a == b );
 
22
}
 
23
 
 
24
Matrix operator*(Matrix const &a, Matrix const &b);
 
25
 
 
26
} /* namespace Geom */
 
27
 
 
28
 
 
29
#endif /* !SEEN_Geom_MATRIX_OPS_H */
 
30
 
 
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 :