Ignore:
Timestamp:
May 15, 2011, 1:16:18 PM (9 years ago)
Author:
sam
Message:

core: add the unary minus operator to vectors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matrix.h

    r761 r768  
    101101        for (int n = 0; n < elems; n++) \
    102102            ret[n] = static_cast<U>((*this)[n]); \
     103        return ret; \
     104    } \
     105    \
     106    inline Vec##elems<T> operator -() const \
     107    { \
     108        Vec##elems<T> ret; \
     109        for (int n = 0; n < elems; n++) \
     110            ret[n] = -(*this)[n]; \
    103111        return ret; \
    104112    } \
Note: See TracChangeset for help on using the changeset viewer.