Trait noise::GenFn2 [] [src]

pub trait GenFn2<T>: Fn(&PermutationTable, &Point2<T>) -> T { }

A trait alias for a 2-dimensional noise function.

This is useful for succinctly parameterising over valid noise functions.

Example

use noise::{GenFn2, PermutationTable, Point2};

fn apply_noise2<F: GenFn2<f32>>(t: &PermutationTable, p: &Point2<f32>, f: F) -> f32 { f(t, p) }

Implementors