Skip to content
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

Example on main README throws error #356

Open
mattmacf98 opened this issue Jul 18, 2024 · 0 comments
Open

Example on main README throws error #356

mattmacf98 opened this issue Jul 18, 2024 · 0 comments

Comments

@mattmacf98
Copy link

use noise::{Fbm, Perlin};
use noise::utils::{NoiseMapBuilder, PlaneMapBuilder};

fn main() {
  let fbm = Fbm::<Perlin>::new(0);

  PlaneMapBuilder::<_, 2>::new(&fbm)
          .set_size(1000, 1000)
          .set_x_bounds(-5.0, 5.0)
          .set_y_bounds(-5.0, 5.0)
          .build()
          .write_to_file("fbm.png");
}

This code which lives in the main README as an example throws the error

error[E0599]: no method named `set_size` found for struct `PlaneMapBuilder<&Fbm<Perlin>, 2>` in the current scope
 --> src/main.rs:8:12
  |
7 | /       PlaneMapBuilder::<_, 2>::new(&fbm)
8 | |           .set_size(1000, 1000)
  | |           -^^^^^^^^ method not found in `PlaneMapBuilder<&Fbm<Perlin>, 2>`
  | |___________|
  | 
  |
  = note: the method was found for
          - `PlaneMapBuilder<NoiseFnWrapper<SourceFn, DIM>, DIM>`
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

No branches or pull requests

1 participant