Skip to content
Snippets Groups Projects
Commit 7565f2c8 authored by Yoel's avatar Yoel
Browse files

Added a constructor for 1-float Vec3

parent 1ca7221e
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,8 @@ Vec3::Vec3(std::array<float, 3> const& arr) : arr(arr) {
}
Vec3::Vec3(float x, float y, float z) : arr(std::array<float, 3>({x, y, z})) {
}
Vec3::Vec3(float xyz) : arr(std::array<float, 3>({xyz, xyz, xyz})) {
}
Vec3::Vec3() : arr(std::array<float, 3>({})) {
}
// Operator
......
......@@ -10,6 +10,7 @@ class Vec3 {
// Constructor
Vec3(std::array<float, 3> const& arr);
Vec3(float x, float y, float z);
Vec3(float xyz);
Vec3();
// Operator
friend std::ostream& operator<<(std::ostream& os, const util::Vec3& rhs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment