2018-09-20 20:23:31 +08:00
|
|
|
use approx::AbsDiffEq;
|
|
|
|
use na::Real;
|
|
|
|
|
2018-09-23 21:59:24 +08:00
|
|
|
/// Default epsilon value used for approximate comparison.
|
2018-09-20 20:23:31 +08:00
|
|
|
pub fn epsilon<N: AbsDiffEq<Epsilon = N>>() -> N {
|
|
|
|
N::default_epsilon()
|
2018-09-20 16:50:34 +08:00
|
|
|
}
|
|
|
|
|
2018-09-22 19:18:59 +08:00
|
|
|
/// The value of PI.
|
2018-09-20 20:23:31 +08:00
|
|
|
pub fn pi<N: Real>() -> N {
|
|
|
|
N::pi()
|
2018-09-20 16:50:34 +08:00
|
|
|
}
|