Skip to main content

Module sui::math

DEPRECATED, use the each integer type's individual module instead, e.g. std::u64

use std::ascii;
use std::option;
use std::string;
use std::u128;
use std::u64;
use std::vector;

Function `max`

DEPRECATED, use std::u64::max instead
public fun max(x: u64, y: u64): u64
Implementation
public fun max(x: u64, y: u64): u64 {
    x.max(y)
}

Function `min`

DEPRECATED, use std::u64::min instead
public fun min(x: u64, y: u64): u64
Implementation
public fun min(x: u64, y: u64): u64 {
    x.min(y)
}

Function `diff`

DEPRECATED, use std::u64::diff instead
public fun diff(x: u64, y: u64): u64
Implementation
public fun diff(x: u64, y: u64): u64 {
    x.diff(y)
}

Function `pow`

DEPRECATED, use std::u64::pow instead
public fun pow(base: u64, exponent: u8): u64
Implementation
public fun pow(base: u64, exponent: u8): u64 {
    base.pow(exponent)
}

Function `sqrt`

DEPRECATED, use std::u64::sqrt instead
public fun sqrt(x: u64): u64
Implementation
public fun sqrt(x: u64): u64 {
    x.sqrt()
}

Function `sqrt_u128`

DEPRECATED, use std::u128::sqrt instead
public fun sqrt_u128(x: u128): u128
Implementation
public fun sqrt_u128(x: u128): u128 {
    x.sqrt()
}

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)
}