Module 0x2::math
DEPRECATED, use the each integer type's individual module instead, e.g. std::u64
- Function
max
- Function
min
- Function
diff
- Function
pow
- Function
sqrt
- Function
sqrt_u128
- Function
divide_and_round_up
use 0x1::u128;
use 0x1::u64;
Function max
DEPRECATED, use std::u64::max instead
public fun max(x: u64, y: u64): u64
Function min
DEPRECATED, use std::u64::min instead
public fun min(x: u64, y: u64): u64
Function diff
DEPRECATED, use std::u64::diff instead
public fun diff(x: u64, y: u64): u64
Function pow
DEPRECATED, use std::u64::pow instead
public fun pow(base: u64, exponent: u8): u64
Function sqrt
DEPRECATED, use std::u64::sqrt instead
public fun sqrt(x: u64): u64
Function sqrt_u128
DEPRECATED, use std::u128::sqrt instead
public fun sqrt_u128(x: u128): u128
Function divide_and_round_up
DEPRECATED, use std::u64::divide_and_round_up instead
public fun divide_and_round_up(x: u64, y: u64): u64
Implementation
public fun divide_and_round_up(x: u64, y: u64): u64 {
x.divide_and_round_up(y)
}