07/05/2022, 2:31 PM
Why kotlin.math functions does not have implementation of Long I have been working with kotlin for little over 2 years now. Looking over what I learned in these 2 years, I noticed that I have been using(num.toDouble()).toLong() for kotlin.math functions a bit too much. For example, Math.sqrt(num.toDouble()).toLong(). Two of my projects have extension function sumByLong() inside util created by team, because kotlin libs only have sumBy:Int and sumByDouble:Double and a lot of work in the project, uses Long. In short, Mathematical operations using Long is...