Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/newmat/boolean.h @ 4639

Last change on this file since 4639 was 4565, checked in by patrick, 19 years ago

orxonox/trunk: added the newmat library to the project. needs some translation in directory, temp under util/newmat. is needed by the collision detection engine to perform lin alg operations such as eigenvector decomposition. perhaps we will make our own library to do that later.

File size: 594 bytes
Line 
1//$$ boolean.h                       bool class
2
3// This is for compilers that do not have bool automatically defined
4
5#ifndef bool_LIB
6#define bool_LIB 0
7
8#ifdef use_namespace
9namespace RBD_COMMON {
10#endif
11
12
13class bool
14{
15        int value;
16public:
17        bool(const int b) { value = b ? 1 : 0; }
18        bool(const void* b) { value = b ? 1 : 0; }
19        bool() {}
20        operator int() const { return value; }
21        int operator!() const { return !value; }
22};
23
24
25const bool true = 1;
26const bool false = 0;
27
28
29
30// version for some older versions of gnu g++
31//#define false 0
32//#define true 1
33
34#ifdef use_namespace
35}
36#endif
37
38
39
40#endif
Note: See TracBrowser for help on using the repository browser.