LiteFX::Math::Vector::Vector¶
Constructors
Synopses¶
Declared in <litefx/vector.hpp>
Initializes an empty vector.
constexpr Vector() noexcept = default;
Initializes a vector with the values provided by another vector.
constexpr Vector(Vector const& _other) = default;
Initializes a vector by taking over another vector.
constexpr Vector(Vector&& _other) noexcept = default;
Initializes a vector where all elements take the value provided by val.
constexpr Vector(T val) noexcept;
Initializes the vector from an arbitrary input range.
constexpr explicit Vector(auto&& input) noexcept
requires std::is_nothrow_convertible_v<std::ranges::range_value_t<decltype(input)>, T>;
Initializes a 2D vector using the values provided by x and y.
constexpr Vector(
T x,
T y) noexcept
requires (DIM == 2);
Initializes a 3D vector using the values provided by x, y and z.
constexpr Vector(
T x,
T y,
T z) noexcept
requires (DIM == 3);
Initializes a 4D vector using the values provided by x, y, z and w.
constexpr Vector(
T x,
T y,
T z,
T w) noexcept
requires (DIM == 4);
Parameters¶
| Name | Description |
|---|---|
| _other | The other vector to copy the values from. |
| val | The value to initialize all elements of the vector with. |
| input | The range to initialize the vector with. |
| x | The value to initialize the x-component of the vector with. |
| y | The value to initialize the y-component of the vector with. |
| z | The value to initialize the z-component of the vector with. |
| w | The value to initialize the w-component of the vector with. |