nalgebra/nalgebra-glm/src/ext/scalar_constants.rs
2018-09-23 17:10:49 +02:00

13 lines
239 B
Rust

use approx::AbsDiffEq;
use na::Real;
/// 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()
}