about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian <chris_veenman@hotmail.com>2019-03-29 16:22:26 +0100
committerChristian <chris_veenman@hotmail.com>2019-03-29 16:22:26 +0100
commit8fe108796d9674bb828023539089b6e0636d9ea1 (patch)
treec6b71c77776e4bd8ef4f43f25da693aaca319726
parent6c479c3d02e134dbc8812582c3241fa8747c35d7 (diff)
downloadrust-8fe108796d9674bb828023539089b6e0636d9ea1.tar.gz
rust-8fe108796d9674bb828023539089b6e0636d9ea1.zip
Added documentation on the remainder (Rem) operator for floating points.
-rw-r--r--src/libcore/ops/arith.rs4
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;