dimanche 3 octobre 2021

Kotlin , code enters if statemant even when condition is false

I'm really confused here ... looks like a really silly mistake but I don't know what's happening. Here's little snippet of my code :

if (tempDeltaDeviation > standardDeltaDeviation) {
                        Log.e(TAG, "handleMessage: plus $tempDeltaDeviation : $standardDeltaDeviation")
                        scaleUpAnimation(deltaAnimStep, "Delta", binding.deltaImg)
}

Really basic stuff, right ? Well checking the logs I can see :

handleMessage: plus 1.57756888292539E14 : 7.8364593205657E13

Dunno but last time I was checking 1 was much smaller than 7 so why app enters if statement ?

Aucun commentaire:

Enregistrer un commentaire