units / org.apache.tuweni.units.bigints / UInt32Value / addMod

addMod

abstract fun addMod(value: T, modulus: UInt32): T (source)
abstract fun addMod(value: Long, modulus: UInt32): T (source)

Returns a value equivalent to ((this + value) mod modulus).

Parameters

value - The amount to be added to this value.

modulus - The modulus.

Exceptions

ArithmeticException - modulus == 0.

Return
(this + value) mod modulus

abstract fun addMod(value: Long, modulus: Long): T (source)

Returns a value equivalent to ((this + value) mod modulus).

Parameters

value - The amount to be added to this value.

modulus - The modulus.

Exceptions

ArithmeticException - modulus ≤ 0.

Return
(this + value) mod modulus