andioop@programming.dev to Programming Horror@programming.devEnglish · edit-21 year agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square50fedilinkarrow-up1106arrow-down111
arrow-up195arrow-down1imageGod I wish there was an easier way to do thisprogramming.devandioop@programming.dev to Programming Horror@programming.devEnglish · edit-21 year agomessage-square50fedilink
minus-squareNullPointer@programming.devlinkfedilinkarrow-up4·1 year agohere is somewhat less: return (number % 2) == 0;
minus-squarehuf [he/him]@hexbear.netlinkfedilinkEnglisharrow-up4·1 year 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);
return !(number & 1);