If let dotIndex = stringFromNumber.range(of: ".")?. Boolean defined in kotlin.ranges public operator fun ClosedRange.contains(value: Double): Boolean defined in kotlin.ranges public operator fun.
Second, people tend to test one's own code with examples which works as expected, even if it is known that the code would not work as expected for some other examples. First of all, you should bettter not use `Double` when you want to control all the behavior abount rounding.Īt any time, calculations on Double or converting Double to decimal representation would cause binary rounding, which may not be as expected from the decimal point of views. Hello, in this lesson, we will be learning about ranges and double dot operators in Kotlin.
0 Comments
Leave a Reply. |