Browse Source

Have non-explicit parameterless constructor for Vector3.

So it's possible to return Vector3 as {}.
vectorfields
Vladimír Vondruš 14 years ago
parent
commit
e5a72b25ce
  1. 5
      src/Math/Vector3.h

5
src/Math/Vector3.h

@ -49,8 +49,11 @@ template<class T> class Vector3: public Vector<3, T> {
a[0]*b[1]-a[1]*b[0]);
}
/** @copydoc Vector::Vector() */
inline constexpr Vector3() {}
/** @copydoc Vector::Vector(T) */
inline constexpr explicit Vector3(T value = T()): Vector<3, T>(value, value, value) {}
inline constexpr explicit Vector3(T value): Vector<3, T>(value, value, value) {}
/** @copydoc Vector::Vector(const Vector&) */
inline constexpr Vector3(const Vector<3, T>& other): Vector<3, T>(other) {}

Loading…
Cancel
Save