Algorithm

Trait Algorithm 

Source
pub trait Algorithm {
    // Required methods
    fn new<R: RandomAlgorithm>(
        dimensions: usize,
        initializer: AlgorithmInitializer<R>,
    ) -> Self;
    fn generate(&self, f: &[f32]) -> f32;
}
Expand description

Noise algorithm trait.

Required Methods§

Source

fn new<R: RandomAlgorithm>( dimensions: usize, initializer: AlgorithmInitializer<R>, ) -> Self

Creates a new noise algorithm instance.

Source

fn generate(&self, f: &[f32]) -> f32

Generates the noise value at the given coordinates.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§