CodyIT@programming.dev to Programmer Humor@programming.devEnglish · 2 个月前This is a glassprogramming.devimagemessage-square65linkfedilinkarrow-up1519arrow-down121
arrow-up1498arrow-down1imageThis is a glassprogramming.devCodyIT@programming.dev to Programmer Humor@programming.devEnglish · 2 个月前message-square65linkfedilink
minus-squareShalien@piefed.projetretro.iolinkfedilinkFrançaisarrow-up5·2 个月前//This a glass // To get the quantity and type of content use // glass->qty : float // glass->content : glass_content
minus-squareLeFrog@discuss.tchncs.delinkfedilinkarrow-up5·2 个月前if glass.empty? make_sad_noise else homi.hydrate(glass.qty) end
minus-squarerbn@sopuli.xyzlinkfedilinkarrow-up3·2 个月前You should check against homi.healthyCapacity first unless you want to drown them.
minus-squarered_tomato@lemmy.worldlinkfedilinkarrow-up4·2 个月前How can you be so sure other readers will understand floating point numbers? Better include the entire IEEE 754 standard just in case.
//This a glass // To get the quantity and type of content use
// glass->qty : float
// glass->content : glass_content
if glass.empty? make_sad_noise else homi.hydrate(glass.qty) endYou should check against homi.healthyCapacity first unless you want to drown them.
How can you be so sure other readers will understand floating point numbers? Better include the entire IEEE 754 standard just in case.