quick-noise 0.2.0

Blazingly fast SIMD procedural noise library for batch and uniform grid sampling with runtime feature detection on stable Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Copy, Clone)]
pub struct Octave<const D: usize> {
    pub weight: f32,
    pub frequency: [f32; D],
}

impl<const D: usize> Octave<D> {
    pub fn new(frequency: [f32; D], weight: f32) -> Self {
        Self { frequency, weight }
    }

    pub fn splat(frequency: f32, weight: f32) -> Self {
        let frequency = [frequency; D];
        Self { frequency, weight }
    }
}