Branchless Scratch?!
So; in messing about trying to optimize my first project, I stumbled upon this little construction, and there was much joy. I didn't see it documented anywhere, so I thought I'd share it here.
Aside from giving you a clever feeling, this allows you to create ternary-like assignments that are executed as a single assignment operation.
Ternary Like Sum Demonstration; Returns false value when Test Flag is 0, true value otherwise.
So is this a terrible idea? Let me know, otherwise hope this helps somebody else rise to the level of write only code.
thanks, and keep being awesome.
Posted Apr 1, 2026, 5:55 AM UTC
34