Ignore:
Timestamp:
Sep 8, 2011, 10:53:45 PM (11 years ago)
Author:
sam
Message:

core: add std::ostream operators for vector and matrix classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matrix.h

    r866 r929  
    1818
    1919#include <cmath>
     20#include <iostream>
    2021
    2122namespace lol
     
    126127        using namespace std; \
    127128        return sqrtf((float)sqlen()); \
    128     }
     129    } \
     130    \
     131    template<typename U> \
     132    friend std::ostream &operator<<(std::ostream &stream, \
     133                                    Vec##elems<U> const &v);
    129134
    130135template <typename T> struct Vec2;
     
    232237
    233238    void printf() const;
     239
     240    template<class U>
     241    friend std::ostream &operator<<(std::ostream &stream, Mat4<U> const &m);
    234242
    235243    inline Mat4<T> operator +(Mat4<T> const val) const
Note: See TracChangeset for help on using the changeset viewer.