implict vector conversion
This commit is contained in:
parent
05fbd3685b
commit
1c2ca715a6
1 changed files with 8 additions and 0 deletions
|
|
@ -161,6 +161,14 @@ namespace Crafter {
|
|||
constexpr Vector(float x, float y) requires(std::same_as<T, float> && Len == 2) : VectorBase<T, Len, Aligment>(x, y) {
|
||||
|
||||
}
|
||||
|
||||
template<std::uint32_t BLen, std::uint32_t BAlign>
|
||||
constexpr Vector(const Vector<T, BLen, BAlign>& b) {
|
||||
for(std::uint32_t i = 0; i < std::min(Len, BLen); i++) {
|
||||
this->v[i] = b.v[i];
|
||||
}
|
||||
}
|
||||
|
||||
constexpr Vector() = default;
|
||||
|
||||
template <std::uint32_t Blen, std::uint32_t BAlignment>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue