Skip navigation
whenever you need a zigzag, don’t write ifs; just fold the number line Math.abs((i+=10)%200 - 100)
0:00 / 0:17

whenever you need a zigzag, don’t write ifs; just fold the number line Math.abs((i+=10)%200 - 100)

David Aerne

@meodai10K followers

Visit on X

18,143 views

whenever you need a zigzag, don’t write ifs; just fold the number line Math.abs((i+=10)%200 - 100) been using this ever since I “discovered” it.

Comments

Comments from the original post on X (Twitter)

No comments yet