Package-level declarations
Functions
Converts bits per second to bytes per second. Example: 8_000_000.0.bpsToBytes() → 1_000_000.0
Formats a bits-per-second value as a human-readable bandwidth string. Example: 1_500_000.0.bpsToHuman() → "1.5 Mbps"
Formats a bytes-per-second value as a human-readable throughput string. Example: 2_097_152.0.bytesPerSecToHuman() → "2.0 MB/s"
Converts bytes per second to bits per second. Example: 1_000_000.0.bytesToBps() → 8_000_000.0
Returns a discount label string. Example: 100.0.discountLabel(80.0) → "-20%"
Rounds a price to the nearest multiple of precision. Example: 14.3.roundToNearest(0.99) → 13.86
Formats a price with compact notation for large values. Example: 1_500_000.0.toCompactPrice() → "$1.5M"
Formats a Double as a price string with a currency symbol. Example: 19.99.toPrice() → "$19.99" Example: 1234.5.toPrice("€", thousandsSep = ".") → "€1.234,50"
Formats a price range. Example: 9.99.toPriceRange(49.99) → "$9.99 – $49.99"
Formats an estimated transfer time from bandwidth (bps) and file size (bytes). Example: 1_000_000.0.transferTimeLabel(5_000_000.0) → "40s"
Estimates the transfer time in seconds for a given fileSizeBytes at this bandwidth (bps). Example: 10_000_000.0.transferTimeSeconds(100_000_000.0) → 0.8 seconds
Formats a data usage percentage out of a quota. Example: 3_000_000_000.0.usagePercent(10_000_000_000.0) → "30.0%"
Returns the pre-tax price from a tax-inclusive price. Example: 120.0.withoutTax(0.20) → 100.0