fix parenthesis error in fee calculation doc (#3928)

This commit is contained in:
samkim-crypto 2022-12-19 13:03:08 +09:00 committed by GitHub
parent ba2b7951fc
commit a083ce4f17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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)?