wcaokaze
03/06/2018, 3:59 PMinfix fun ClosedFloatingPointRange<Float>.step(step: Float) = Iterable {
object : Iterator<Float> {
private val precision = step / 2
private var nextIndex = 0
override fun hasNext()
= start + nextIndex * step <= endInclusive + precision
override fun next() = start + nextIndex++ * step
}
}