pub trait UnsafeMathTrait {
    fn div_rounding_up(x: Self, y: Self) -> Self;
}
Expand description

! Math functions that do not check inputs or outputs ! Contains methods that perform common math functions but do not do any ! overflow or underflow checks

Required methods

Returns ceil (x / y) Division by 0 throws a panic, and must be checked externally

In Solidity dividing by 0 results in 0, not an exception.

Arguments
  • x - The dividend
  • y - The divisor

Implementations on Foreign Types

Implementors