alphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 2 years agoJavalemmy.worldimagemessage-square5fedilinkarrow-up15arrow-down10
arrow-up15arrow-down1imageJavalemmy.worldalphacyberranger@lemmy.world to Programmer Humor@programming.devEnglish · 2 years agomessage-square5fedilink
minus-squarekorstmos@kbin.sociallinkfedilinkarrow-up1·2 years 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)