mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 06:24:58 +00:00
LibGfx: Add VectorN::operator==
This commit is contained in:
parent
44afc8678d
commit
55dfeedc46
1 changed files with 11 additions and 0 deletions
|
@ -197,6 +197,17 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
template<ConvertibleTo<T> U>
|
||||
constexpr bool operator==(VectorN<N, U> const& other) const
|
||||
{
|
||||
UNROLL_LOOP
|
||||
for (auto i = 0u; i < N; ++i) {
|
||||
if (m_data[i] != static_cast<T>(other.m_data[i]))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr T dot(VectorN const& other) const
|
||||
{
|
||||
T result {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue