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 {
|
||||
/// Calculate ceiling-division
|
||||
///
|
||||
/// Ceiling-division `ceil[ dividend / divisor ]` can be represented as a floor-division
|
||||
/// `floor[ dividend + (divisor - 1) / divisor ]`
|
||||
/// Ceiling-division `ceil[ numerator / denominator ]` can be represented as a floor-division
|
||||
/// `floor[ (numerator + denominator - 1) / denominator ]`
|
||||
fn ceil_div(dividend: u128, divisor: u128) -> Option<u128> {
|
||||
dividend
|
||||
.checked_add(divisor)?
|
||||
|
|
Loading…
Reference in New Issue