Skip to content

Commit

Permalink
Clean up imprecise math
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Jul 17, 2023
1 parent c3086ea commit 81a4342
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 49 deletions.
2 changes: 1 addition & 1 deletion drop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void prep_drop_states(struct drop_state ds[], int maxzoom, int basezoom, double
// basezoom - 2: 6.25 (droprate ^ 2)
// ...
// basezoom - n: (droprate ^ n)
ds[i].interval = std::exp(std::log(droprate) * (basezoom - i));
ds[i].interval = std::powf(droprate, basezoom - i);
}

ds[i].error = 0;
Expand Down
Loading

0 comments on commit 81a4342

Please sign in to comment.