b algiment
This commit is contained in:
parent
5b9b9dc472
commit
6f54581dfe
1 changed files with 8 additions and 8 deletions
|
|
@ -114,16 +114,16 @@ namespace Crafter {
|
|||
);
|
||||
}
|
||||
|
||||
template <std::uint32_t Blen>
|
||||
Vector<T, Len, Aligment> operator+(Vector<T, Blen, Aligment> b){
|
||||
template <std::uint32_t Blen, std::uint32_t BAlignment>
|
||||
Vector<T, Len, Aligment> operator+(Vector<T, Blen, BAlignment> b){
|
||||
Vector<T, Len, Aligment> resultVector;
|
||||
for(std::uint32_t i = 0; i < std::min(Len, Blen); i++) {
|
||||
resultVector.v[i] = this->v[i]+b.v[i];
|
||||
}
|
||||
return resultVector;
|
||||
}
|
||||
template <std::uint32_t Blen>
|
||||
Vector<T, Len, Aligment> operator-(Vector<T, Blen, Aligment> b){
|
||||
template <std::uint32_t Blen, std::uint32_t BAlignment>
|
||||
Vector<T, Len, Aligment> operator-(Vector<T, Blen, BAlignment> b){
|
||||
Vector<T, Len, Aligment> resultVector;
|
||||
for(std::uint32_t i = 0; i < std::min(Len, Blen); i++) {
|
||||
resultVector.v[i] = this->v[i]-b.v[i];
|
||||
|
|
@ -137,16 +137,16 @@ namespace Crafter {
|
|||
}
|
||||
return resultVector;
|
||||
}
|
||||
template <std::uint32_t Blen>
|
||||
Vector<T, Len, Aligment> operator*(Vector<T, Blen, Aligment> b){
|
||||
template <std::uint32_t Blen, std::uint32_t BAlignment>
|
||||
Vector<T, Len, Aligment> operator*(Vector<T, Blen, BAlignment> b){
|
||||
Vector<T, Len, Aligment> resultVector;
|
||||
for(std::uint32_t i = 0; i < std::min(Len, Blen); i++) {
|
||||
resultVector.v[i] = this->v[i]*b.v[i];
|
||||
}
|
||||
return resultVector;
|
||||
}
|
||||
template <std::uint32_t Blen>
|
||||
Vector<T, Len, Aligment> operator/(Vector<T, Blen, Aligment> b){
|
||||
template <std::uint32_t Blen, std::uint32_t BAlignment>
|
||||
Vector<T, Len, Aligment> operator/(Vector<T, Blen, BAlignment> b){
|
||||
Vector<T, Len, Aligment> resultVector;
|
||||
for(std::uint32_t i = 0; i < std::min(Len, Blen); i++) {
|
||||
resultVector.v[i] = this->v[i]/b.v[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue