T
: Either f32
or f64
use libm::{self, Libm};
const PI_F32: f32 = 3.1415927410e+00;
const PI_F64: f64 = 3.1415926535897931160e+00;
assert!(Libm::<f32>::cos(0.0f32) == libm::cosf(0.0));
assert!(Libm::<f32>::sin(PI_F32) == libm::sinf(PI_F32));
assert!(Libm::<f64>::cos(0.0f64) == libm::cos(0.0));
assert!(Libm::<f64>::sin(PI_F64) == libm::sin(PI_F64));