Skip to content

Commit

Permalink
fix base density function error and add a bunch of test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kralverde committed Nov 28, 2024
1 parent f25e9aa commit 2fc5ddd
Show file tree
Hide file tree
Showing 29 changed files with 1,476,507 additions and 120 deletions.
9 changes: 9 additions & 0 deletions pumpkin-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ pub enum ProfileAction {
ForcedNameChange,
UsingBannedSkin,
}

#[macro_export]
macro_rules! assert_eq_delta {
($x:expr, $y:expr, $d:expr) => {
if !(2f64 * ($x - $y).abs() <= $d * ($x.abs() + $y.abs())) {
panic!("{} vs {} ({} vs {})", $x, $y, ($x - $y).abs(), $d);
}
};
}
Loading

0 comments on commit 2fc5ddd

Please sign in to comment.