Skip to content

Commit

Permalink
fix: fixed #7, added a check before passing the points
Browse files Browse the repository at this point in the history
Ideally should add the check in th distribution, and they could return `Option<f32, f32>`, but that might complicate stuff
  • Loading branch information
Saphereye committed Jul 1, 2024
1 parent 6667490 commit 7e0a062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ fn ui(
point_data.0.clear();
drawing_history.0.clear();

if point_data.1.is_empty() {
if point_data.1.is_empty() && point_data.3 > 0 {
(0..=point_data.3).for_each(|i| match distribution.0 {
DistributionType::Fibonacci => {
let color = Color::hsl(360. * i as f32 / point_data.3 as f32, 0.95, 0.7);
Expand Down

0 comments on commit 7e0a062

Please sign in to comment.