alphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 1 year agoJavalemmy.worldimagemessage-square4fedilinkarrow-up118arrow-down10
arrow-up118arrow-down1imageJavalemmy.worldalphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 1 year agomessage-square4fedilink
minus-squarekorstmos@kbin.sociallinkfedilinkarrow-up1·1 year agoDoubles have a much higher max value than ints, so if the method were to convert all doubles to ints they would not work for double values above 2^31-1. (It would work, but any value over 2^31-1 passed to such a function would get clamped to 2^31-1)
Doubles have a much higher max value than ints, so if the method were to convert all doubles to ints they would not work for double values above 2^31-1.
(It would work, but any value over 2^31-1 passed to such a function would get clamped to 2^31-1)