diff options
| author | Christian <chris_veenman@hotmail.com> | 2019-03-29 16:22:26 +0100 |
|---|---|---|
| committer | Christian <chris_veenman@hotmail.com> | 2019-03-29 16:22:26 +0100 |
| commit | 8fe108796d9674bb828023539089b6e0636d9ea1 (patch) | |
| tree | c6b71c77776e4bd8ef4f43f25da693aaca319726 | |
| parent | 6c479c3d02e134dbc8812582c3241fa8747c35d7 (diff) | |
| download | rust-8fe108796d9674bb828023539089b6e0636d9ea1.tar.gz rust-8fe108796d9674bb828023539089b6e0636d9ea1.zip | |
Added documentation on the remainder (Rem) operator for floating points.
| -rw-r--r-- | src/libcore/ops/arith.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/ops/arith.rs b/src/libcore/ops/arith.rs index 0252edee231..007a8db6c47 100644 --- a/src/libcore/ops/arith.rs +++ b/src/libcore/ops/arith.rs @@ -537,6 +537,10 @@ rem_impl_integer! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } macro_rules! rem_impl_float { ($($t:ty)*) => ($( + + /// The remainder from the division of two floats. + /// + /// The remainder has the same sign as the dividend. For example: `-5.0 % 2.0 = -1.0`. #[stable(feature = "rust1", since = "1.0.0")] impl Rem for $t { type Output = $t; |
