Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation formatting with commonmark enabled #340

Merged
merged 1 commit into from
Oct 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bigint/src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,15 +1366,15 @@ impl<R: Rng> RandBigInt for R {
impl BigInt {
/// Creates and initializes a BigInt.
///
/// The digits are in little-endian base 2^32.
/// The digits are in little-endian base 2<sup>32</sup>.
#[inline]
pub fn new(sign: Sign, digits: Vec<BigDigit>) -> BigInt {
BigInt::from_biguint(sign, BigUint::new(digits))
}

/// Creates and initializes a `BigInt`.
///
/// The digits are in little-endian base 2^32.
/// The digits are in little-endian base 2<sup>32</sup>.
#[inline]
pub fn from_biguint(mut sign: Sign, mut data: BigUint) -> BigInt {
if sign == NoSign {
Expand Down Expand Up @@ -1444,7 +1444,7 @@ impl BigInt {
/// Creates and initializes a `BigInt` from an array of bytes in
/// two's complement binary representation.
///
/// The digits are in big-endian base 2^8.
/// The digits are in big-endian base 2<sup>8</sup>.
#[inline]
pub fn from_signed_bytes_be(digits: &[u8]) -> BigInt {
let sign = match digits.first() {
Expand All @@ -1465,7 +1465,7 @@ impl BigInt {

/// Creates and initializes a `BigInt` from an array of bytes in two's complement.
///
/// The digits are in little-endian base 2^8.
/// The digits are in little-endian base 2<sup>8</sup>.
#[inline]
pub fn from_signed_bytes_le(digits: &[u8]) -> BigInt {
let sign = match digits.last() {
Expand Down
6 changes: 3 additions & 3 deletions bigint/src/biguint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1325,23 +1325,23 @@ pub fn to_str_radix_reversed(u: &BigUint, radix: u32) -> Vec<u8> {
impl BigUint {
/// Creates and initializes a `BigUint`.
///
/// The digits are in little-endian base 2^32.
/// The digits are in little-endian base 2<sup>32</sup>.
#[inline]
pub fn new(digits: Vec<BigDigit>) -> BigUint {
BigUint { data: digits }.normalized()
}

/// Creates and initializes a `BigUint`.
///
/// The digits are in little-endian base 2^32.
/// The digits are in little-endian base 2<sup>32</sup>.
#[inline]
pub fn from_slice(slice: &[BigDigit]) -> BigUint {
BigUint::new(slice.to_vec())
}

/// Assign a value to a `BigUint`.
///
/// The digits are in little-endian base 2^32.
/// The digits are in little-endian base 2<sup>32</sup>.
#[inline]
pub fn assign_from_slice(&mut self, slice: &[BigDigit]) {
self.data.resize(slice.len(), 0);
Expand Down
4 changes: 2 additions & 2 deletions complex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ impl<T: Clone + Float> Complex<T> {
pub fn arg(&self) -> T {
self.im.atan2(self.re)
}
/// Convert to polar form (r, theta), such that `self = r * exp(i
/// * theta)`
/// Convert to polar form (r, theta), such that
/// `self = r * exp(i * theta)`
#[inline]
pub fn to_polar(&self) -> (T, T) {
(self.norm(), self.arg())
Expand Down