mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:37:35 +00:00
LibGfx+LibSoftGPU: Allow indexed reads into Gfx::Vector
This commit is contained in:
parent
20a5a4363c
commit
870b835115
2 changed files with 9 additions and 22 deletions
|
@ -56,6 +56,12 @@ public:
|
|||
constexpr void set_z(T value) requires(N >= 3) { m_data[2] = value; }
|
||||
constexpr void set_w(T value) requires(N >= 4) { m_data[3] = value; }
|
||||
|
||||
[[nodiscard]] constexpr T operator[](size_t index) const
|
||||
{
|
||||
VERIFY(index < N);
|
||||
return m_data[index];
|
||||
}
|
||||
|
||||
constexpr VectorN& operator+=(const VectorN& other)
|
||||
{
|
||||
UNROLL_LOOP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue