Struct noise_functions::Frequency

source ·
pub struct Frequency<Noise> {
    pub noise: Noise,
    pub frequency: f32,
}
Expand description

Wraps a noise and modifies its frequency.

This multiplies the point by the provided frequency before sampling.

Fields§

§noise: Noise§frequency: f32

Trait Implementations§

source§

impl<Noise: Clone> Clone for Frequency<Noise>

source§

fn clone(&self) -> Frequency<Noise>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Noise: Debug> Debug for Frequency<Noise>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Noise: PartialEq> PartialEq for Frequency<Noise>

source§

fn eq(&self, other: &Frequency<Noise>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const DIM: usize, Noise> Sample<DIM> for Frequency<Noise>
where Noise: Sample<DIM, [f32; DIM]>,

source§

fn sample(&self, point: [f32; DIM]) -> f32

source§

impl<const DIM: usize, const LANES: usize, Noise> Sample<DIM, Simd<f32, LANES>> for Frequency<Noise>
where Noise: Sample<DIM, Simd<f32, LANES>>, LaneCount<LANES>: SupportedLaneCount,

Available on crate feature nightly-simd only.
source§

fn sample(&self, point: Simd<f32, LANES>) -> f32

source§

impl<Noise: Copy> Copy for Frequency<Noise>

source§

impl<Noise> StructuralPartialEq for Frequency<Noise>

Auto Trait Implementations§

§

impl<Noise> Freeze for Frequency<Noise>
where Noise: Freeze,

§

impl<Noise> RefUnwindSafe for Frequency<Noise>
where Noise: RefUnwindSafe,

§

impl<Noise> Send for Frequency<Noise>
where Noise: Send,

§

impl<Noise> Sync for Frequency<Noise>
where Noise: Sync,

§

impl<Noise> Unpin for Frequency<Noise>
where Noise: Unpin,

§

impl<Noise> UnwindSafe for Frequency<Noise>
where Noise: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Noise> Sample2 for Noise
where Noise: Sample<2>,

source§

fn sample2(&self, point: impl Into<[f32; 2]>) -> f32

source§

impl<Noise> Sample2a for Noise
where Noise: Sample<2, Simd<f32, 2>>,

source§

fn sample2a(&self, point: impl Into<Simd<f32, 2>>) -> f32

Available on crate feature nightly-simd only.
source§

impl<Noise> Sample3 for Noise
where Noise: Sample<3>,

source§

fn sample3(&self, point: impl Into<[f32; 3]>) -> f32

source§

impl<Noise> Sample3a for Noise
where Noise: Sample<3, Simd<f32, 4>>,

source§

fn sample3a(&self, point: impl Into<Simd<f32, 4>>) -> f32

Available on crate feature nightly-simd only.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.