Package-level declarations

Types

Link copied to clipboard

Properties

Link copied to clipboard
const val BYTES_TO_GB: Long
Link copied to clipboard
const val BYTES_TO_KB: Long = 1024
Link copied to clipboard
const val BYTES_TO_MB: Long
Link copied to clipboard
const val BYTES_TO_TB: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:RequiresApi(value = 26)
val Number.days: Duration
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val Int.half: Int
Link copied to clipboard
@get:RequiresApi(value = 26)
val Number.hours: Duration
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns true if this number is null or zero (0)

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns kilometers to meters

Link copied to clipboard
Link copied to clipboard

Converts meters to km

Link copied to clipboard

Convert meters to miles

Link copied to clipboard

Convert miles to meters

Link copied to clipboard
@get:RequiresApi(value = 26)
val Number.millis: Duration
Link copied to clipboard
@get:RequiresApi(value = 26)
val Number.minutes: Duration
Link copied to clipboard
@get:RequiresApi(value = 26)
val Number.nanos: Duration
Link copied to clipboard
Link copied to clipboard

Returns Zero (0) if this number is null

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:RequiresApi(value = 26)
val Long.seconds: Duration
@get:RequiresApi(value = 26)
val Number.seconds: Duration
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Convert Celsius temperature to Fahrenheit

Link copied to clipboard
fun Double.clamp(min: Double, max: Double): Double
fun Float.clamp(min: Float, max: Float): Float
fun Int.clamp(min: Int, max: Int): Int
fun Long.clamp(min: Long, max: Long): Long
fun Short.clamp(min: Short, max: Short): Short
Link copied to clipboard

Convets given bytes to human readable form.

Link copied to clipboard
fun Int.digits(): List<Int>

Decompose an Int value into it's component digits.

Link copied to clipboard
inline fun <T : Number> Context?.dimen(@DimenRes res: Int): T
Link copied to clipboard
infix fun Int.divides(other: Int): Boolean

Is the integer dividable

Link copied to clipboard
infix fun Int.doesNotDivide(other: Int): Boolean

Is the integer not dividable

Link copied to clipboard
infix fun Byte.equals(value: Int): Boolean
Link copied to clipboard
infix fun Int.erase(n: Int): Int
Link copied to clipboard
Link copied to clipboard

Convert Fahrenheit temperature to Celsius

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Int.forEach(callback: (i: Int) -> Unit)
Link copied to clipboard
fun Double.format(pattern: String): String
fun Float.format(precision: Int? = null): String
fun Double.format(pattern: String, roundingMode: RoundingMode): String
fun Double.format(pattern: String, groupingSeperator: Char): String
fun Double.format(pattern: String, init: DecimalFormat.() -> Unit): String
fun Double.format(pattern: String, groupingSeperator: Char, decimalSeperator: Char): String
Link copied to clipboard

alternative to Formatter.formatFileSize which doesn't show bytes and rounds to int

Link copied to clipboard
fun Int.gcd(n: Int): Int
Link copied to clipboard
fun generateRandomDoubleNumber(fromNo: Double = 0.0, toNo: Double = 1000.0, noToBeGenerated: Int = 20): List<Double>
Link copied to clipboard
fun generateRandomNumber(fromNo: Int = 0, toNo: Int = 1000, noToBeGenerated: Int = 20): List<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getRandomString(lengthOfString: Int = 20): String
Link copied to clipboard
fun Int.getString(context: Context?): String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun BigInteger.isPrime(certainty: Int = 5, precise: Boolean = false): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun lowPassFilter(input: FloatArray, output: FloatArray?, filter: Float): FloatArray

This method filter the value in array, which is two frequent

Link copied to clipboard
infix fun Byte.notEquals(value: Int): Boolean
Link copied to clipboard
Link copied to clipboard
fun Float.percentToValueOfRange(min: Float = 0.0f, max: Float): Float

Calculates a value in a given range by percentage.

Link copied to clipboard
infix fun BigDecimal.pow(exp: Int): BigDecimal
infix fun BigInteger.pow(exp: Int): BigInteger
infix fun Int.pow(power: Number): Double
Link copied to clipboard
fun probablePrime(bits: Int, random: Random = Random()): BigInteger
Link copied to clipboard
Link copied to clipboard
infix fun Int.root(n: Number): Double
Link copied to clipboard
fun Double.round(mathContext: MathContext = MathContext(1)): BigDecimal
fun Float.round(mathContext: MathContext = MathContext(1)): BigDecimal
fun Number.round(@IntRange(from = 1) decimalCount: Int): String
fun BigDecimal.round(precision: Int = 1, roundingMode: RoundingMode = RoundingMode.HALF_UP): BigDecimal
fun Double.round(precision: Int = 1, roundingMode: RoundingMode = RoundingMode.HALF_UP): BigDecimal
fun Float.round(precision: Int = 1, roundingMode: RoundingMode = RoundingMode.HALF_UP): BigDecimal
Link copied to clipboard
Link copied to clipboard
fun Double.roundDown(pattern: String): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
infix fun Byte.shl(bitCount: Int): Byte
Link copied to clipboard
infix fun Byte.shlx(bitCount: Int): Int
Link copied to clipboard
infix fun Byte.shr(bitCount: Int): Byte
Link copied to clipboard
infix fun Byte.shrx(bitCount: Int): Int
Link copied to clipboard
fun Int.sleep()
fun Long.sleep()
Link copied to clipboard
fun Double.toBigDecimal(mathContext: MathContext = MathContext.UNLIMITED): BigDecimal
fun Number.toBigDecimal(mathContext: MathContext = MathContext.UNLIMITED): BigDecimal
Link copied to clipboard
Link copied to clipboard

B\KB\MB\GB

Link copied to clipboard
Link copied to clipboard
infix fun Int.toThe(power: Number): Double
Link copied to clipboard

int time to 2 digit String

Link copied to clipboard
fun Float.valueToPercentOfRange(min: Float = 0.0f, max: Float): Float

Calculates the percentage of a value in a given range.

Link copied to clipboard
infix fun Byte.xorx(byteArray: ByteArray?): Byte
infix fun Byte.xorx(short: Short): Byte