Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello.
- If i compile this code,
- extern crate noise;
- extern crate rand;
- use noise::*;
- fn test(){
- let mut v = vec![ Brownian2::new( perlin2::<f64>, 4) ];
- println!( "{:?}", v );
- }
- rustc says that v have elemetns with type
- noise::Brownian2<f64, fn(&noise::PermutationTable, &[f64; 2]) -> f64 {noise::perlin2::<f64>}>
- Question.
- How should i define my type, so following code will compile correctly:
- extern crate noise;
- extern crate rand;
- use noise::*;
- type Generator = <... there is something to be ...>;
- fn test() {
- let mut a: Vec<Generator> = Vec::new();
- a.push( Brownian2::new( &perlin2::<f64>, 4) );
- }
Add Comment
Please, Sign In to add comment