Numeric conversions
Convert explicitly; narrowing rejects out-of-range values.
Example.kalm
kalm
pub fun small(value: Int) -> Byte = value.toByte()
pub fun roundedDown(value: Double) -> Int = value.toInt()Convert explicitly; narrowing rejects out-of-range values.
pub fun small(value: Int) -> Byte = value.toByte()
pub fun roundedDown(value: Double) -> Int = value.toInt()