/* -*- C++ -*- * Copyright ©2004 Hugo Mills * * This software is distributed under the terms of the GNU GPL v3 * For more information on the GPL, see the file COPYING or * visit http://www.gnu.org/ * * This software is distributed without warranty */ #ifndef VECTORS_H #define VECTORS_H #include //typedef std::valarray dvec; //typedef std::valarray ivec; template class _vec : public std::valarray { public: _vec() : std::valarray(L) { } _vec(const T& v) : std::valarray(v, L) { } _vec(const std::valarray& v) : std::valarray(v) { } virtual ~_vec() { } }; typedef _vec dvec2; typedef _vec dvec3; typedef _vec ivec2; typedef _vec ivec3; typedef _vec dmat3; #endif