title: Kotlin: How do i check if a number has decimal points (modulus solution doesn't work)
body: <p>I'm new to Kotlin and came from JS. I am currently making a calculator app and am working on the '%' operator. I need to find out if the output of the 'current input * 0.01' is a whole number or with decimal points. Usually, I would use</p>
  
  <pre><code>num % 1 !== 0
  </code></pre>
  
  <p>but it does not work in Kotlin and gives me the error "!= operator cannot be applied to Double or Int". It is the same for Strings or Characters. My Kotlin code is below, hope someone can help! Thanks!</p>
  
  <pre><code>val percentResult: Double() = result.toDouble() * 0.01
    if(percentResult % 1 != 0) {
     result = (NumberFormat.getInstance().format(percentResult)).toString()
    } else {
     result = percentResult.toInt().toString()
    }
  </code></pre>