pub struct Sub<A, B> {
pub lhs: A,
pub rhs: B,
}
Expand description
Subtracts one output value from the other.
Fields§
§lhs: A
§rhs: B
Trait Implementations§
Source§impl<A, B> Noise for Sub<A, B>
impl<A, B> Noise for Sub<A, B>
Source§fn sample2a<Point>(&self, point: Point) -> f32
fn sample2a<Point>(&self, point: Point) -> f32
Available on crate feature
nightly-simd
only.Samples the noise in 2D.
Source§fn sample3a<Point>(&self, point: Point) -> f32
fn sample3a<Point>(&self, point: Point) -> f32
Available on crate feature
nightly-simd
only.Samples the noise in 3D.
Source§fn sample4a<Point>(&self, point: Point) -> f32
fn sample4a<Point>(&self, point: Point) -> f32
Available on crate feature
nightly-simd
only.Samples the noise in 4D.
Source§fn seed(self, seed: i32) -> Seeded<Self>where
Self: Sized,
fn seed(self, seed: i32) -> Seeded<Self>where
Self: Sized,
Overwrites the seed to be sampled with. Read more
Source§fn mul_seed(self, value: i32) -> MulSeed<Self>where
Self: Sized,
fn mul_seed(self, value: i32) -> MulSeed<Self>where
Self: Sized,
Multiplies the seed by
value
.Source§fn frequency<F>(self, frequency: F) -> Frequency<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
fn frequency<F>(self, frequency: F) -> Frequency<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
Modifies a noise with a frequency multiplier. Read more
Source§fn ridged(self) -> Ridged<Self>where
Self: Sized,
fn ridged(self) -> Ridged<Self>where
Self: Sized,
Modifies a noise to create a peak at 0. Read more
Source§fn triangle_wave<F>(self, frequency: F) -> TriangleWave<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
fn triangle_wave<F>(self, frequency: F) -> TriangleWave<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
Applies a triangle wave to the output of a noise function. Read more
Source§fn tileable(self, width: f32, height: f32) -> Tileable<Self>where
Self: Sized,
fn tileable(self, width: f32, height: f32) -> Tileable<Self>where
Self: Sized,
Creates a tileable 2D noise from a 4D noise. Read more
Source§fn translate_x<X>(self, x: X) -> TranslateX<Self, X::Noise>where
Self: Sized,
X: ValueOrNoise,
fn translate_x<X>(self, x: X) -> TranslateX<Self, X::Noise>where
Self: Sized,
X: ValueOrNoise,
Translates the point before it is used to sample
self
.Source§fn translate_xy<X, Y>(self, x: X, y: Y) -> TranslateXy<Self, X::Noise, Y::Noise>
fn translate_xy<X, Y>(self, x: X, y: Y) -> TranslateXy<Self, X::Noise, Y::Noise>
Translates the point before it is used to sample
self
.Source§fn translate_xyz<X, Y, Z>(
self,
x: X,
y: Y,
z: Z,
) -> TranslateXyz<Self, X::Noise, Y::Noise, Z::Noise>
fn translate_xyz<X, Y, Z>( self, x: X, y: Y, z: Z, ) -> TranslateXyz<Self, X::Noise, Y::Noise, Z::Noise>
Translates the point before it is used to sample
self
.Source§fn translate_xyzw<X, Y, Z, W>(
self,
x: X,
y: Y,
z: Z,
w: W,
) -> TranslateXyzw<Self, X::Noise, Y::Noise, Z::Noise, W::Noise>
fn translate_xyzw<X, Y, Z, W>( self, x: X, y: Y, z: Z, w: W, ) -> TranslateXyzw<Self, X::Noise, Y::Noise, Z::Noise, W::Noise>
Translates the point before it is used to sample
self
.Source§fn add<Rhs>(self, rhs: Rhs) -> Add<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn add<Rhs>(self, rhs: Rhs) -> Add<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Adds the output values.
Source§fn sub<Rhs>(self, rhs: Rhs) -> Sub<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn sub<Rhs>(self, rhs: Rhs) -> Sub<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Subtracts one output value from the other.
Source§fn mul<Rhs>(self, rhs: Rhs) -> Mul<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn mul<Rhs>(self, rhs: Rhs) -> Mul<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Multiplies the output values.
Source§fn div<Rhs>(self, rhs: Rhs) -> Div<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn div<Rhs>(self, rhs: Rhs) -> Div<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Divides one output value by the other.
Source§fn rem<Rhs>(self, rhs: Rhs) -> Rem<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn rem<Rhs>(self, rhs: Rhs) -> Rem<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Calculates the remainder from dividing one output value by the other.
Source§fn min<Rhs>(self, rhs: Rhs) -> Min<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn min<Rhs>(self, rhs: Rhs) -> Min<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Computes the minimum of the two output values.
Source§fn max<Rhs>(self, rhs: Rhs) -> Max<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn max<Rhs>(self, rhs: Rhs) -> Max<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Computes the maximum of the two output values.
Source§fn clamp<Min, Max>(
self,
min: Min,
max: Max,
) -> Clamp<Self, Min::Noise, Max::Noise>
fn clamp<Min, Max>( self, min: Min, max: Max, ) -> Clamp<Self, Min::Noise, Max::Noise>
Returns
max
if value
is greater than max
and min
if value
is less than min
.
Otherwise this will return value
. Read moreSource§fn lerp<B, T>(self, b: B, t: T) -> Lerp<Self, B::Noise, T::Noise>
fn lerp<B, T>(self, b: B, t: T) -> Lerp<Self, B::Noise, T::Noise>
Linearly interpolates between
self
and b
.Source§fn pow<Rhs>(self, rhs: Rhs) -> Pow<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn pow<Rhs>(self, rhs: Rhs) -> Pow<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Raises the output value to a power.
Source§fn floor(self) -> Floor<Self>where
Self: Sized,
fn floor(self) -> Floor<Self>where
Self: Sized,
Computes the largest integer less than or equal to the output value.
Source§fn ceil(self) -> Ceil<Self>where
Self: Sized,
fn ceil(self) -> Ceil<Self>where
Self: Sized,
Computes the smallest integer greater than or equal to self.
Source§fn round(self) -> Round<Self>where
Self: Sized,
fn round(self) -> Round<Self>where
Self: Sized,
Computes the nearest integer to the output value.
If a value is half-way between two integers, round away from 0.0.
Source§fn sin(self) -> Sin<Self>where
Self: Sized,
fn sin(self) -> Sin<Self>where
Self: Sized,
Computes the sine of the output value (in radians).
Source§fn cos(self) -> Cos<Self>where
Self: Sized,
fn cos(self) -> Cos<Self>where
Self: Sized,
Computes the cosine of the output value (in radians).
Source§fn tan(self) -> Tan<Self>where
Self: Sized,
fn tan(self) -> Tan<Self>where
Self: Sized,
Computes the tangent of the output value (in radians).
Source§impl<const DIM: usize, const LANES: usize, A, B> Sample<DIM, Simd<f32, LANES>> for Sub<A, B>
Available on crate feature nightly-simd
only.
impl<const DIM: usize, const LANES: usize, A, B> Sample<DIM, Simd<f32, LANES>> for Sub<A, B>
Available on crate feature
nightly-simd
only.impl<A: Copy, B: Copy> Copy for Sub<A, B>
impl<A: Eq, B: Eq> Eq for Sub<A, B>
impl<A, B> StructuralPartialEq for Sub<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Sub<A, B>
impl<A, B> RefUnwindSafe for Sub<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Sub<A, B>
impl<A, B> Sync for Sub<A, B>
impl<A, B> Unpin for Sub<A, B>
impl<A, B> UnwindSafe for Sub<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more