« * K @coboldthefox.bsky.social

Cobold 🦊👑 @coboldthefox.bsky.social

2026-09-28 16:48 UTC

This is also really handy for wrapping values. Value = (MaxValue + Value) % MaxValue The value will wrap back to 0 when it exceeds max value, or wrap the opposite way to max value when it's below 0. For example, keeping an angle between 0 and 360. Angle = (360 + Angle) % 360

A reply in a thread.

1 likes, 0 reposts, 0 replies

3 Next post4 More from @coboldthefox.bsky.socialBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup