fix parenthesis error in fee calculation doc (#3928)
This commit is contained in:
parent
ba2b7951fc
commit
a083ce4f17
|
@ -37,8 +37,8 @@ pub struct TransferFee {
|
||||||
impl TransferFee {
|
impl TransferFee {
|
||||||
/// Calculate ceiling-division
|
/// Calculate ceiling-division
|
||||||
///
|
///
|
||||||
/// Ceiling-division `ceil[ dividend / divisor ]` can be represented as a floor-division
|
/// Ceiling-division `ceil[ numerator / denominator ]` can be represented as a floor-division
|
||||||
/// `floor[ dividend + (divisor - 1) / divisor ]`
|
/// `floor[ (numerator + denominator - 1) / denominator ]`
|
||||||
fn ceil_div(dividend: u128, divisor: u128) -> Option<u128> {
|
fn ceil_div(dividend: u128, divisor: u128) -> Option<u128> {
|
||||||
dividend
|
dividend
|
||||||
.checked_add(divisor)?
|
.checked_add(divisor)?
|
||||||
|
|
Loading…
Reference in New Issue