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 traits::Number;
|
||||
|
||||
/// The euler constant.
|
||||
pub fn e<N: Real>() -> N {
|
||||
@ -42,9 +41,7 @@ pub fn ln_two<N: Real>() -> N {
|
||||
}
|
||||
|
||||
/// Returns `1`.
|
||||
pub fn one<N: Number>() -> N {
|
||||
N::one()
|
||||
}
|
||||
pub use na::one;
|
||||
|
||||
/// Returns `1 / pi`.
|
||||
pub fn one_over_pi<N: Real>() -> N {
|
||||
@ -133,6 +130,4 @@ pub fn two_thirds<N: Real>() -> N {
|
||||
}
|
||||
|
||||
/// Returns `0`.
|
||||
pub fn zero<N: Number>() -> N {
|
||||
N::zero()
|
||||
}
|
||||
pub use na::zero;
|
Loading…
Reference in New Issue
Block a user