toPositiveInt

@SinceKotoolsTypes(version = "4.1")
fun Number.toPositiveInt(): Result<PositiveInt>

Returns this number as an encapsulated PositiveInt, which may involve rounding or truncation, or returns an encapsulated IllegalArgumentException if this number is strictly negative.