Enum nannou::noise::RangeFunction
source · pub enum RangeFunction {
Euclidean,
EuclideanSquared,
Manhattan,
Chebyshev,
Quadratic,
}
Expand description
Set of distance functions that can be used in the Worley noise function.
Variants§
Euclidean
The standard linear distance. Expensive to compute because it requires square root calculations.
EuclideanSquared
Same as Euclidean, but without the square root calculations. Distance results will be smaller, however, but hash patterns will be the same.
Manhattan
Measured by only moving in straight lines along the axes. Diagonal movement is not allowed, which leads to increased distances.
Chebyshev
Measured by taking the largest distance along any axis as the total distance. Since this eliminates all but one dimension, it results in significantly shorter distances and produces regions where the distances are uniform.
Quadratic
Experimental function where all values are multiplied together and then added up like a quadratic equation.
Trait Implementations§
source§impl Clone for RangeFunction
impl Clone for RangeFunction
source§fn clone(&self) -> RangeFunction
fn clone(&self) -> RangeFunction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RangeFunction
impl Debug for RangeFunction
impl Copy for RangeFunction
Auto Trait Implementations§
impl RefUnwindSafe for RangeFunction
impl Send for RangeFunction
impl Sync for RangeFunction
impl Unpin for RangeFunction
impl UnwindSafe for RangeFunction
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains the unclamped color. Read more