forked from M-Labs/nalgebra
.min() and .max(): updated examples to be more concise
This commit is contained in:
parent
ee1eafc861
commit
d9a9c60602
@ -918,7 +918,7 @@ impl<N: Scalar, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
|||||||
/// # use nalgebra::Vector3;
|
/// # use nalgebra::Vector3;
|
||||||
/// assert_eq!(Vector3::new(-1.0, 2.0, 3.0).max(), 3.0);
|
/// assert_eq!(Vector3::new(-1.0, 2.0, 3.0).max(), 3.0);
|
||||||
/// assert_eq!(Vector3::new(-1.0, -2.0, -3.0).max(), -1.0);
|
/// assert_eq!(Vector3::new(-1.0, -2.0, -3.0).max(), -1.0);
|
||||||
/// assert_eq!(Vector3::<u32>::new(5, 2, 3).max(), 5);
|
/// assert_eq!(Vector3::new(5u32, 2, 3).max(), 5);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn max(&self) -> N
|
pub fn max(&self) -> N
|
||||||
@ -960,7 +960,7 @@ impl<N: Scalar, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
|
|||||||
/// # use nalgebra::Vector3;
|
/// # use nalgebra::Vector3;
|
||||||
/// assert_eq!(Vector3::new(-1.0, 2.0, 3.0).min(), -1.0);
|
/// assert_eq!(Vector3::new(-1.0, 2.0, 3.0).min(), -1.0);
|
||||||
/// assert_eq!(Vector3::new(1.0, 2.0, 3.0).min(), 1.0);
|
/// assert_eq!(Vector3::new(1.0, 2.0, 3.0).min(), 1.0);
|
||||||
/// assert_eq!(Vector3::<u32>::new(5, 2, 3).min(), 2);
|
/// assert_eq!(Vector3::new(5u32, 2, 3).min(), 2);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn min(&self) -> N
|
pub fn min(&self) -> N
|
||||||
|
Loading…
Reference in New Issue
Block a user