nalgebra/nalgebra-glm/src/ext/scalar_constants.rs

13 lines
239 B
Rust
Raw Normal View History

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