Hi! I'm a C++ engineer with 20+ years of experience. I can still never remember which way around `array[x][y]` the `x` and `y` should go.
Vastauksena käyttäjälle @mattgodbolt
I wrote a convenience function. xy_to_index(x, y, width). And one to go the opposite: index_to_xy(index, width). Always use single dimension arrays. This is usually for texture processing for me.
9.48 - 10. helmik. 2021
0 vastausta
0 uudelleentwiittausta
3 tykkäystä
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.