andioop@programming.dev to Programming Horror@programming.devEnglish · edit-27 months agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square44fedilinkarrow-up1104arrow-down111
arrow-up193arrow-down1imageGod I wish there was an easier way to do thisprogramming.devandioop@programming.dev to Programming Horror@programming.devEnglish · edit-27 months agomessage-square44fedilink
minus-squareNullPointer@programming.devlinkfedilinkarrow-up3·7 months agohere is somewhat less: return (number % 2) == 0;
minus-squarehuf [he/him]@hexbear.netlinkfedilinkEnglisharrow-up4·7 months agojust check the last bit jesus christ, what is it with these expensive modulo operations?! return !(n&1);
here is somewhat less:
return (number % 2) == 0;
just check the last bit jesus christ, what is it with these expensive modulo operations?!
return !(n&1);