Skip to main content

Offset

Struct Offset 

Source
pub struct Offset<S: NoiseSource> { /* private fields */ }
Expand description

Add offset to noise output

Trait Implementations§

Source§

impl<S: NoiseSource> NoiseSource for Offset<S>

Source§

fn sample(&self, x: f64, y: f64) -> f64

Sample noise at 2D coordinates, returns value typically in [-1, 1]

Auto Trait Implementations§

§

impl<S> Freeze for Offset<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Offset<S>
where S: RefUnwindSafe,

§

impl<S> Send for Offset<S>
where S: Send,

§

impl<S> Sync for Offset<S>
where S: Sync,

§

impl<S> Unpin for Offset<S>
where S: Unpin,

§

impl<S> UnwindSafe for Offset<S>
where S: 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<T> NoiseExt for T
where T: NoiseSource,

Source§

fn scale(self, factor: f64) -> Scale<Self>

Scale output by a factor
Source§

fn offset(self, amount: f64) -> Offset<Self>

Add offset to output
Source§

fn clamp(self, min: f64, max: f64) -> Clamp<Self>

Clamp output to range
Source§

fn abs(self) -> Abs<Self>

Take absolute value
Source§

fn fbm(self, octaves: u32, lacunarity: f64, persistence: f64) -> Fbm<Self>

Apply fractal brownian motion
Source§

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

Source§

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>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V