Merge pull request #3 from jirheee/doc

cargo doc
This commit is contained in:
Haechan An
2023-08-26 20:09:18 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ use std::ops::*;
/// Rational number represented by two isize, numerator and denominator. /// Rational number represented by two isize, numerator and denominator.
/// ///
/// Each Rational number should be normalized so that `demoninator` is nonnegative and `numerator` and `demoninator` are coprime. /// Each Rational number should be normalized so that `demoninator` is nonnegative and `numerator` and `demoninator` are coprime.
/// See [`normalize`] for examples. As a corner case, 0 is represented by Rational { numerator: 0, demoninator: 0 }. /// See `normalize` for examples. As a corner case, 0 is represented by Rational { numerator: 0, demoninator: 0 }.
/// ///
/// For "natural use", Rational also overloads standard arithmetic operations, i.e, `+`, `-`, `*`, `/`. /// For "natural use", Rational also overloads standard arithmetic operations, i.e, `+`, `-`, `*`, `/`.
/// ///

View File

@@ -11,7 +11,7 @@ use std::{iter::zip, ops::*};
/// For example, the vector `vec![44,345,3]` represents the integer /// For example, the vector `vec![44,345,3]` represents the integer
/// `44 * (2^32)^2 + 345 * (2^32) + 3`, /// `44 * (2^32)^2 + 345 * (2^32) + 3`,
/// and the vector `vec![u32::MAX - 5, u32::MAX - 7]` represents the integer /// and the vector `vec![u32::MAX - 5, u32::MAX - 7]` represents the integer
/// `- (5 * 2^32 + 8) /// `- (5 * 2^32 + 8)`
/// ///
/// You will implement the `Add` and `Sub` trait for this type. /// You will implement the `Add` and `Sub` trait for this type.
/// ///