Skip to content

small fix: empty range error in circle_packing#967

Open
joaoag wants to merge 1 commit intonannou-org:masterfrom
joaoag:circle-packing-fix
Open

small fix: empty range error in circle_packing#967
joaoag wants to merge 1 commit intonannou-org:masterfrom
joaoag:circle-packing-fix

Conversation

@joaoag
Copy link
Copy Markdown

@joaoag joaoag commented Mar 16, 2024

Motivation for changes

  • I was playing with the circle_packing example to better understand the egui library
  • On setting both min radius and max radius to 0, the program panics and exits with cannot sample empty range
  • I really value Nannou as a library, so wanted to give back a little by including a fix for this

Summary of changes

  • Set minimum value of max radius to 0.1 to avoid empty range errors

PR checklist

As per the docs I have:

  • run cargo fmt --all
  • Errors, none shown
  • Warnings, no new added
  • Check Examples, have run all examples with cargo run --bin run_all_examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant