Re-export nalgebra's zero and one instead of defining new ones.
This commit is contained in:
parent
b8b86e72b5
commit
053d51989a
|
@ -1,5 +1,4 @@
|
||||||
use na::{self, Real};
|
use na::{self, Real};
|
||||||
use traits::Number;
|
|
||||||
|
|
||||||
/// The euler constant.
|
/// The euler constant.
|
||||||
pub fn e<N: Real>() -> N {
|
pub fn e<N: Real>() -> N {
|
||||||
|
@ -42,9 +41,7 @@ pub fn ln_two<N: Real>() -> N {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `1`.
|
/// Returns `1`.
|
||||||
pub fn one<N: Number>() -> N {
|
pub use na::one;
|
||||||
N::one()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns `1 / pi`.
|
/// Returns `1 / pi`.
|
||||||
pub fn one_over_pi<N: Real>() -> N {
|
pub fn one_over_pi<N: Real>() -> N {
|
||||||
|
@ -133,6 +130,4 @@ pub fn two_thirds<N: Real>() -> N {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `0`.
|
/// Returns `0`.
|
||||||
pub fn zero<N: Number>() -> N {
|
pub use na::zero;
|
||||||
N::zero()
|
|
||||||
}
|
|
Loading…
Reference in New Issue