-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: clarify documentation on how to set Fbm parameters, or make fields private #229
Comments
Thank you for pointing this out. I'll have to go over Fbm and the other structs, and make sure that they can't end up in an invalid state during construction. |
I have a question, which is kind of related: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since
Fbm
's fields are public, I assumed that the correct way of changing them was just to modify them.This worked for many cases, but then I noticed that I sometimes started getting panics, which I tracked down to me setting
octaves
to greater than 6, e.g.:which panics with
After reading the source, I eventually found out that there was a
MultiFractal
trait which adds aset_octaves
function toFbm
- using that avoids the panic.It took me a while to disover that though, so adding some docs saying that Fbm's fields shouldn't be mutated directly (or maybe making them private), and adding a mention of the
MultiFractal
train in theFbm
docs could make things clearer.The text was updated successfully, but these errors were encountered: