Enum 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 more