We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
next_multiple_of
prev_multiple_of
1 parent 93176f5 commit 7f88fdeCopy full SHA for 7f88fde
1 file changed
src/lib.rs
@@ -195,6 +195,10 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
195
196
/// Rounds up to nearest multiple of argument.
197
///
198
+ /// # Notes
199
+ ///
200
+ /// For signed types, `a.next_multiple_of(b) = a.prev_multiple_of(b.neg())`.
201
202
/// # Examples
203
204
/// ~~~
@@ -216,6 +220,10 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
216
220
217
221
/// Rounds down to nearest multiple of argument.
218
222
223
224
225
+ /// For signed types, `a.prev_multiple_of(b) = a.next_multiple_of(b.neg())`.
226
219
227
228
229
0 commit comments