toULong
@ExperimentalUnsignedTypes fun Byte.toULong(): ULongConverts this Byte value to ULong.
If this value is positive, the resulting ULong value represents the same numerical value as this Byte.
The least significant 8 bits of the resulting ULong value are the same as the bits of this Byte value,
whereas the most significant 56 bits are filled with the sign bit of this value.
@ExperimentalUnsignedTypes fun Short.toULong(): ULongConverts this Short value to ULong.
If this value is positive, the resulting ULong value represents the same numerical value as this Short.
The least significant 16 bits of the resulting ULong value are the same as the bits of this Short value,
whereas the most significant 48 bits are filled with the sign bit of this value.
@ExperimentalUnsignedTypes fun Int.toULong(): ULongConverts this Int value to ULong.
If this value is positive, the resulting ULong value represents the same numerical value as this Int.
The least significant 32 bits of the resulting ULong value are the same as the bits of this Int value,
whereas the most significant 32 bits are filled with the sign bit of this value.
@ExperimentalUnsignedTypes fun Long.toULong(): ULong@ExperimentalUnsignedTypes fun Float.toULong(): ULongConverts this Float value to ULong.
The fractional part, if any, is rounded down towards zero.
Returns zero if this Float value is negative or NaN, ULong.MAX_VALUE if it's bigger than ULong.MAX_VALUE.
@ExperimentalUnsignedTypes fun Double.toULong(): ULongConverts this Double value to ULong.
The fractional part, if any, is rounded down towards zero.
Returns zero if this Double value is negative or NaN, ULong.MAX_VALUE if it's bigger than ULong.MAX_VALUE.