Advertisement
Miseryk

C++ Branchless Abs v2

Mar 21st, 2023
514
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.06 KB | Source Code | 0 0
  1. int abs2(int a)
  2. {
  3.     return a * ((a >= 0) * 2 - 1);
  4. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement