mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-25 20:28:05 +00:00
Add equality operators
This commit is contained in:
parent
e06f60c536
commit
31c799a02a
1 changed files with 14 additions and 0 deletions
|
@ -74,6 +74,20 @@ namespace FasTC {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Equality comparison
|
||||||
|
template<typename _T>
|
||||||
|
bool operator==(const VectorBase<_T, N> &v) const {
|
||||||
|
bool result = true;
|
||||||
|
for(int i = 0; i < N; i++)
|
||||||
|
result = result && (vec[i] == v[i]);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _T>
|
||||||
|
bool operator!=(const VectorBase<_T, N> &v) const {
|
||||||
|
return !(operator==(v));
|
||||||
|
}
|
||||||
|
|
||||||
// Allows casting to other vector types if the underlying type system does as well...
|
// Allows casting to other vector types if the underlying type system does as well...
|
||||||
template<typename _T>
|
template<typename _T>
|
||||||
operator VectorBase<_T, N>() const {
|
operator VectorBase<_T, N>() const {
|
||||||
|
|
Loading…
Reference in a new issue