mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 09:35:48 +01:00
Add equality operators
This commit is contained in:
parent
e06f60c536
commit
31c799a02a
@ -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 New Issue
Block a user