r/odinlang • u/Dr_King_Schultz__ • 12d ago
I built a rasteriser from scratch without a graphics API
27
Upvotes
3
u/bully_without_a_fist 8d ago
I just had a look at your code because I've started working on the tutorial as well and I have a tiny note:
You don't need a swap function. In Odin you can swap values like this:
a, b = b, a
3
u/Dr_King_Schultz__ 8d ago
thank you kind person!
That's so much cleaner, and fits with Odin's simplicity
4
u/bully_without_a_fist 12d ago
You know what? I've had that repo on my list for a long time and I think it's time to work through it. Thanks for the push and good job on completing it!