jroid8@lemmy.world to Programmer Humor · 1 年前know the features of your languagelemmy.worldimagemessage-square147fedilinkarrow-up1650arrow-down124
arrow-up1626arrow-down1imageknow the features of your languagelemmy.worldjroid8@lemmy.world to Programmer Humor · 1 年前message-square147fedilink
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up6arrow-down2·edit-21 年前This must be a custom random function, because it’s standard for random to return a float between 0-1 exclusive. Maybe you meant to multiply by 100 instead of modulo.
minus-squaredrolex@sopuli.xyzlinkfedilinkarrow-up11arrow-down1·1 年前I think for once I didn’t fuck up. https://cplusplus.com/reference/cstdlib/rand/
minus-squareSnazz@lemmy.worldlinkfedilinkarrow-up5·1 年前You guys are talking about two different things. Random integer vs random float
This must be a custom random function, because it’s standard for random to return a float between 0-1 exclusive. Maybe you meant to multiply by 100 instead of modulo.
I think for once I didn’t fuck up.
https://cplusplus.com/reference/cstdlib/rand/
You guys are talking about two different things. Random integer vs random float