☆ Yσɠƚԋσʂ ☆ to Programmer Humor · 2 years agoThe New Mathimagemessage-square16fedilinkarrow-up160arrow-down15
arrow-up155arrow-down1imageThe New Math☆ Yσɠƚԋσʂ ☆ to Programmer Humor · 2 years agomessage-square16fedilink
minus-squarekevincoxlinkfedilinkarrow-up9·2 years agoThe source of this appears to be that 0.0000001.toString() == "1e-7". Presumably parseInt first converts its argument to a String (which kinda makes sense). Of course the more important question is why are you passing a number to parseInt?
The source of this appears to be that
0.0000001.toString() == "1e-7"
. PresumablyparseInt
first converts its argument to a String (which kinda makes sense).Of course the more important question is why are you passing a number to
parseInt
?