Scribus
Open source desktop publishing at your fingertips
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ord.h
1
2
#ifndef __2GEOM_ORD__
3
#define __2GEOM_ORD__
4
5
namespace
{
6
7
enum
Cmp {
8
LESS_THAN=-1,
9
GREATER_THAN=1,
10
EQUAL_TO=0
11
};
12
13
inline
Cmp operator-(Cmp x) {
14
switch
(x) {
15
case
LESS_THAN:
16
return
GREATER_THAN;
17
case
GREATER_THAN:
18
return
LESS_THAN;
19
case
EQUAL_TO:
20
return
EQUAL_TO;
21
}
22
}
23
24
template
<
typename
T1,
typename
T2>
25
inline
Cmp cmp(T1
const
&a, T2
const
&b) {
26
if
( a < b ) {
27
return
LESS_THAN;
28
}
else
if
( b < a ) {
29
return
GREATER_THAN;
30
}
else
{
31
return
EQUAL_TO;
32
}
33
}
34
35
}
36
37
#endif
scribus
third_party
lib2geom
ord.h
Generated on Tue Sep 29 2015 09:15:14 for Scribus by
1.8.9.1