From e894367c52b8629332d84665149076825b766f0b Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 8 Oct 2023 14:56:32 +0100 Subject: [PATCH] use proper implementation of cos to check against --- agb-fixnum/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agb-fixnum/src/lib.rs b/agb-fixnum/src/lib.rs index 19e5a704..ea8d4adf 100644 --- a/agb-fixnum/src/lib.rs +++ b/agb-fixnum/src/lib.rs @@ -1230,7 +1230,10 @@ mod tests { #[test] fn check_cos_accuracy() { let n: Num = Num::new(1) / 32; - assert_eq!(n.cos(), num!(0.9808)); + assert_eq!( + n.cos(), + Num::from_f64((2. * core::f64::consts::PI / 32.).cos()) + ); } #[test]