Skip to content

Commit

Permalink
note relation of next_multiple_of and prev_multiple_of
Browse files Browse the repository at this point in the history
  • Loading branch information
strake committed Feb 23, 2019
1 parent 93176f5 commit 7f88fde
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {

/// Rounds up to nearest multiple of argument.
///
/// # Notes
///
/// For signed types, `a.next_multiple_of(b) = a.prev_multiple_of(b.neg())`.
///
/// # Examples
///
/// ~~~
Expand All @@ -216,6 +220,10 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {

/// Rounds down to nearest multiple of argument.
///
/// # Notes
///
/// For signed types, `a.prev_multiple_of(b) = a.next_multiple_of(b.neg())`.
///
/// # Examples
///
/// ~~~
Expand Down

0 comments on commit 7f88fde

Please sign in to comment.