Browse Source

Math: lol wait, I used scatter() wrong in here the whole time?!

Since the very first time scatter() got introduced in 2019, in
acc8d8994b. Only the recently added
CORRADE_NODISCARD annotation uncovered the bug.
pull/686/head
Vladimír Vondruš 3 months ago
parent
commit
5383daf3b4
  1. 2
      doc/snippets/Math.cpp

2
doc/snippets/Math.cpp

@ -190,7 +190,7 @@ Math::Vector<6, Int> w10xyz = Math::gather<'w', '1', '0', 'x', 'y', 'z'>(orig);
Vector4 vec{1.5f, 3.0f, 0.1f, 1.1f}; Vector4 vec{1.5f, 3.0f, 0.1f, 1.1f};
Vector2 coords{5.0f, -2.0f}; Vector2 coords{5.0f, -2.0f};
Math::scatter<'z', 'w'>(vec, coords); // {1.5f, 3.0f, 5.0f, -2.0f} Math::scatterInto<'z', 'w'>(vec, coords); // {1.5f, 3.0f, 5.0f, -2.0f}
/* [matrix-vector-access-swizzle] */ /* [matrix-vector-access-swizzle] */
static_cast<void>(bgra); static_cast<void>(bgra);

Loading…
Cancel
Save