conversion madness
This commit is contained in:
parent
c8656a351b
commit
a4b70aecda
1 changed files with 9 additions and 7 deletions
|
|
@ -162,15 +162,17 @@ namespace Crafter {
|
|||
|
||||
}
|
||||
|
||||
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 BAlignment>
|
||||
constexpr operator Vector<T, Len, BAlignment>() const {
|
||||
Vector<T, Len, BAlignment> returnVector;
|
||||
for(std::uint32_t i = 0; i < Len; i++) {
|
||||
returnVector.v[i] = this->v[i];
|
||||
}
|
||||
return returnVector;
|
||||
}
|
||||
|
||||
template <std::uint32_t Blen, std::uint32_t BAlignment>
|
||||
constexpr Vector<T, Len, Aligment> operator+(Vector<T, Blen, BAlignment> b) const {
|
||||
Vector<T, Len, Aligment> resultVector;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue