Browse Source

Store template parameters in Vector class for later retrieving.

vectorfields
Vladimír Vondruš 15 years ago
parent
commit
79aabfc0cc
  1. 3
      src/Math/Vector.h

3
src/Math/Vector.h

@ -29,6 +29,9 @@ namespace Magnum { namespace Math {
/** @brief Vector */ /** @brief Vector */
template<class T, size_t size> class Vector { template<class T, size_t size> class Vector {
public: public:
typedef T Type;
const static size_t Size = size;
/** @brief Angle between vectors */ /** @brief Angle between vectors */
inline static T angle(const Vector<T, size>& a, const Vector<T, size>& b) { inline static T angle(const Vector<T, size>& a, const Vector<T, size>& b) {
return acos((a*b)/(a.length()*b.length())); return acos((a*b)/(a.length()*b.length()));

Loading…
Cancel
Save