v1.8.0
  • Solutions
    • Multiplatform Mobile
    • Multiplatform for other platforms
    • Server-side
    • Web frontend
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← Docs
kotlin-stdlib / kotlin / UByte / mod

mod

Common
JVM
JS
Native
1.0
fun mod(other: UByte): UByte
(source)
fun mod(other: UShort): UShort
(source)
fun mod(other: UInt): UInt
(source)
fun mod(other: ULong): ULong
(source)

Calculates the remainder of flooring division of this value by the other value.

The result is always less than the divisor.

For unsigned types, the remainders of flooring division and truncating division are the same.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains