mod

inline fun Byte.mod(other: Byte): Byte(source)
inline fun Byte.mod(other: Short): Short(source)
inline fun Byte.mod(other: Int): Int(source)
inline fun Byte.mod(other: Long): Long(source)
inline fun Short.mod(other: Byte): Byte(source)
inline fun Short.mod(other: Short): Short(source)
inline fun Short.mod(other: Int): Int(source)
inline fun Short.mod(other: Long): Long(source)
inline fun Int.mod(other: Byte): Byte(source)
inline fun Int.mod(other: Short): Short(source)
inline fun Int.mod(other: Int): Int(source)
inline fun Int.mod(other: Long): Long(source)
inline fun Long.mod(other: Byte): Byte(source)
inline fun Long.mod(other: Short): Short(source)
inline fun Long.mod(other: Int): Int(source)
inline fun Long.mod(other: Long): Long(source)

Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).

The result is either zero or has the same sign as the divisor and has the absolute value less than the absolute value of the divisor.

Since Kotlin

1.5

inline fun Float.mod(other: Float): Float(source)
inline fun Float.mod(other: Double): Double(source)
inline fun Double.mod(other: Float): Double(source)
inline fun Double.mod(other: Double): Double(source)

Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).

The result is either zero or has the same sign as the divisor and has the absolute value less than the absolute value of the divisor.

If the result cannot be represented exactly, it is rounded to the nearest representable number. In this case the absolute value of the result can be less than or equal to the absolute value of the divisor.

Since Kotlin

1.5