Remove implementations of conversions from UByte/UShort to Float/Double

This commit is contained in:
Abduqodiri Qurbonzoda
2019-03-07 19:06:49 +03:00
parent d12e5ddafc
commit 82002e5e73
5 changed files with 4 additions and 62 deletions
@@ -299,24 +299,3 @@ public inline fun Int.toUByte(): UByte = UByte(this.toByte())
@ExperimentalUnsignedTypes
@kotlin.internal.InlineOnly
public inline fun Long.toUByte(): UByte = UByte(this.toByte())
/**
* Converts this [Float] value to [UByte].
*
* The fractional part, if any, is rounded down.
* Returns zero if this `Float` value is negative or `NaN`, [UByte.MAX_VALUE] if it's bigger than `UByte.MAX_VALUE`.
*/
@SinceKotlin("1.3")
@ExperimentalUnsignedTypes
@kotlin.internal.InlineOnly
public inline fun Float.toUByte(): UByte = doubleToUByte(this.toDouble())
/**
* Converts this [Double] value to [UByte].
*
* The fractional part, if any, is rounded down.
* Returns zero if this `Double` value is negative or `NaN`, [UByte.MAX_VALUE] if it's bigger than `UByte.MAX_VALUE`.
*/
@SinceKotlin("1.3")
@ExperimentalUnsignedTypes
@kotlin.internal.InlineOnly
public inline fun Double.toUByte(): UByte = doubleToUByte(this)