Changeset 516
- Timestamp:
- Apr 20, 2011, 9:02:25 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/lol/matrix.h
r509 r516 38 38 } 39 39 40 #define BOOL_OP(elems, op, ret) \40 #define BOOL_OP(elems, op, op2, ret) \ 41 41 inline bool operator op(Vec##elems<T> const &val) const \ 42 42 { \ 43 43 for (int n = 0; n < elems; n++) \ 44 if ( (*this)[n] != val[n]) \45 return ret; \46 return !ret; \44 if (!((*this)[n] op2 val[n])) \ 45 return !ret; \ 46 return ret; \ 47 47 } 48 48 … … 79 79 VECTOR_OP(elems, /) \ 80 80 \ 81 BOOL_OP(elems, ==, false) \ 82 BOOL_OP(elems, !=, true) \ 81 BOOL_OP(elems, ==, ==, true) \ 82 BOOL_OP(elems, !=, ==, false) \ 83 BOOL_OP(elems, <=, <=, true) \ 84 BOOL_OP(elems, >=, >=, true) \ 85 BOOL_OP(elems, <, <, true) \ 86 BOOL_OP(elems, >, >, true) \ 83 87 \ 84 88 SCALAR_OP(elems, -) \
Note: See TracChangeset
for help on using the changeset viewer.