diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index d5c1fd2fe..808a00e92 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -26,14 +26,14 @@ namespace Magnum { namespace Math { /** @brief Three-component vector */ template class Vector3: public Vector { public: - /** @brief Unit vector in direction of X axis */ - inline static Vector3 xAxis() { return Vector3(1, 0, 0); } + /** @brief Vector in direction of X axis */ + inline static Vector3 xAxis(T length = 1) { return Vector3(length, 0, 0); } - /** @brief Unit vector in direction of Y axis */ - inline static Vector3 yAxis() { return Vector3(0, 1, 0); } + /** @brief Vector in direction of Y axis */ + inline static Vector3 yAxis(T length = 1) { return Vector3(0, length, 0); } - /** @brief Unit vector in direction of Z axis */ - inline static Vector3 zAxis() { return Vector3(0, 0, 1); } + /** @brief Vector in direction of Z axis */ + inline static Vector3 zAxis(T length = 1) { return Vector3(0, 0, length); } /** @brief Cross product */ static Vector3 cross(const Vector3& a, const Vector3& b) {