diff --git a/Cargo.toml b/Cargo.toml index 4d56f00..08dbbaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libnoise" -version = "1.0.0" +version = "1.1.0" authors = ["Contributors to the libnoise-rs Repository"] edition = "2021" license = "MIT" diff --git a/src/core/adapters/abs.rs b/src/core/adapters/abs.rs index 0ac4526..3663330 100644 --- a/src/core/adapters/abs.rs +++ b/src/core/adapters/abs.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`abs()`]: Generator::abs #[derive(Clone, Copy, Debug)] -pub struct Abs -where - G: Generator, -{ +pub struct Abs { generator: G, } diff --git a/src/core/adapters/add.rs b/src/core/adapters/add.rs index ed07bba..e4747c8 100644 --- a/src/core/adapters/add.rs +++ b/src/core/adapters/add.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`add()`]: Generator::add #[derive(Clone, Copy, Debug)] -pub struct Add -where - G: Generator, -{ +pub struct Add { generator: G, offset: f64, } diff --git a/src/core/adapters/billow.rs b/src/core/adapters/billow.rs index 3b56af7..620e267 100644 --- a/src/core/adapters/billow.rs +++ b/src/core/adapters/billow.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`billow()`]: Generator::billow #[derive(Clone, Copy, Debug)] -pub struct Billow -where - G: Generator, -{ +pub struct Billow { generator: G, octaves: u32, frequency: f64, diff --git a/src/core/adapters/blend.rs b/src/core/adapters/blend.rs index 4407029..0d22b48 100644 --- a/src/core/adapters/blend.rs +++ b/src/core/adapters/blend.rs @@ -9,12 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`blend()`]: Generator::blend #[derive(Clone, Copy, Debug)] -pub struct Blend -where - GA: Generator, - GB: Generator, - GC: Generator, -{ +pub struct Blend { generator_a: GA, generator_b: GB, generator_control: GC, diff --git a/src/core/adapters/clamp.rs b/src/core/adapters/clamp.rs index deacbe2..c5aacec 100644 --- a/src/core/adapters/clamp.rs +++ b/src/core/adapters/clamp.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`clamp()`]: Generator::clamp #[derive(Clone, Copy, Debug)] -pub struct Clamp -where - G: Generator, -{ +pub struct Clamp { generator: G, min: f64, max: f64, diff --git a/src/core/adapters/displace.rs b/src/core/adapters/displace.rs index e7316d6..33e19e6 100644 --- a/src/core/adapters/displace.rs +++ b/src/core/adapters/displace.rs @@ -9,11 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`displace_x()`]: Generator2D::displace_x #[derive(Clone, Copy, Debug)] -pub struct Displace -where - G: Generator, - GA: Generator, -{ +pub struct Displace { generator: G, displacement_generator: GA, } diff --git a/src/core/adapters/exp.rs b/src/core/adapters/exp.rs index f20b536..ae6fa71 100644 --- a/src/core/adapters/exp.rs +++ b/src/core/adapters/exp.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`exp()`]: Generator::exp #[derive(Clone, Copy, Debug)] -pub struct Exp -where - G: Generator, -{ +pub struct Exp { generator: G, } diff --git a/src/core/adapters/fbm.rs b/src/core/adapters/fbm.rs index 5c35209..bda03ee 100644 --- a/src/core/adapters/fbm.rs +++ b/src/core/adapters/fbm.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`fbm()`]: Generator::fbm #[derive(Clone, Copy, Debug)] -pub struct Fbm -where - G: Generator, -{ +pub struct Fbm { generator: G, octaves: u32, frequency: f64, diff --git a/src/core/adapters/lambda.rs b/src/core/adapters/lambda.rs index ee98c05..d364388 100644 --- a/src/core/adapters/lambda.rs +++ b/src/core/adapters/lambda.rs @@ -8,11 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`lambda()`]: Generator::lambda #[derive(Clone, Copy, Debug)] -pub struct Lambda -where - G: Generator, - L: Fn(f64) -> f64, -{ +pub struct Lambda { generator: G, lambda: L, } diff --git a/src/core/adapters/max.rs b/src/core/adapters/max.rs index 927089f..82d2692 100644 --- a/src/core/adapters/max.rs +++ b/src/core/adapters/max.rs @@ -9,11 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`max()`]: Generator::max #[derive(Clone, Copy, Debug)] -pub struct Max -where - GA: Generator, - GB: Generator, -{ +pub struct Max { generator_a: GA, generator_b: GB, } diff --git a/src/core/adapters/min.rs b/src/core/adapters/min.rs index ef59c61..ee78a0a 100644 --- a/src/core/adapters/min.rs +++ b/src/core/adapters/min.rs @@ -9,11 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`min()`]: Generator::min #[derive(Clone, Copy, Debug)] -pub struct Min -where - GA: Generator, - GB: Generator, -{ +pub struct Min { generator_a: GA, generator_b: GB, } diff --git a/src/core/adapters/mul.rs b/src/core/adapters/mul.rs index 3d41659..558ae8c 100644 --- a/src/core/adapters/mul.rs +++ b/src/core/adapters/mul.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`mul()`]: Generator::mul #[derive(Clone, Copy, Debug)] -pub struct Mul -where - G: Generator, -{ +pub struct Mul { generator: G, scale: f64, } diff --git a/src/core/adapters/pow.rs b/src/core/adapters/pow.rs index 6de5fde..d83e3b6 100644 --- a/src/core/adapters/pow.rs +++ b/src/core/adapters/pow.rs @@ -9,10 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// [`powi()`]: Generator::powi /// [`powf()`]: Generator::powf #[derive(Clone, Copy, Debug)] -pub struct Pow -where - G: Generator, -{ +pub struct Pow { generator: G, exponent: T, } diff --git a/src/core/adapters/power.rs b/src/core/adapters/power.rs index 2669360..c073c74 100644 --- a/src/core/adapters/power.rs +++ b/src/core/adapters/power.rs @@ -9,11 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`power()`]: Generator::power #[derive(Clone, Copy, Debug)] -pub struct Power -where - GA: Generator, - GB: Generator, -{ +pub struct Power { generator_a: GA, generator_b: GB, } diff --git a/src/core/adapters/ridgedmulti.rs b/src/core/adapters/ridgedmulti.rs index 77f399c..df6030c 100644 --- a/src/core/adapters/ridgedmulti.rs +++ b/src/core/adapters/ridgedmulti.rs @@ -9,10 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// [`fbm()`]: Generator:fbm /// [`ridgedmulti()`]: Generator::ridgedmulti #[derive(Clone, Copy, Debug)] -pub struct RidgedMulti -where - G: Generator, -{ +pub struct RidgedMulti { generator: G, octaves: u32, frequency: f64, diff --git a/src/core/adapters/rotate.rs b/src/core/adapters/rotate.rs index 16e419e..e3a7c3b 100644 --- a/src/core/adapters/rotate.rs +++ b/src/core/adapters/rotate.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator2D, Generator3D, Generator4D}; /// /// [`rotate()`]: Generator2D::rotate #[derive(Clone, Copy, Debug)] -pub struct Rotate -where - G: Generator, -{ +pub struct Rotate { generator: G, rotation: [f64; P], } diff --git a/src/core/adapters/scale.rs b/src/core/adapters/scale.rs index b8905a1..de6427b 100644 --- a/src/core/adapters/scale.rs +++ b/src/core/adapters/scale.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`scale()`]: Generator::scale #[derive(Clone, Copy, Debug)] -pub struct Scale -where - G: Generator, -{ +pub struct Scale { generator: G, scale: [f64; D], } diff --git a/src/core/adapters/select.rs b/src/core/adapters/select.rs index 432119e..f66ac7d 100644 --- a/src/core/adapters/select.rs +++ b/src/core/adapters/select.rs @@ -10,12 +10,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`select()`]: Generator::select #[derive(Clone, Copy, Debug)] -pub struct Select -where - GA: Generator, - GB: Generator, - GC: Generator, -{ +pub struct Select { generator_a: GA, generator_b: GB, generator_control: GC, diff --git a/src/core/adapters/sum.rs b/src/core/adapters/sum.rs index edae123..4e8bae8 100644 --- a/src/core/adapters/sum.rs +++ b/src/core/adapters/sum.rs @@ -9,11 +9,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`sum()`]: Generator::sum #[derive(Clone, Copy, Debug)] -pub struct Sum -where - GA: Generator, - GB: Generator, -{ +pub struct Sum { generator_a: GA, generator_b: GB, } diff --git a/src/core/adapters/translate.rs b/src/core/adapters/translate.rs index 5c7ac41..d593e46 100644 --- a/src/core/adapters/translate.rs +++ b/src/core/adapters/translate.rs @@ -8,10 +8,7 @@ use crate::core::generator::{Generator, Generator1D, Generator2D, Generator3D, G /// /// [`translate()`]: Generator::translate #[derive(Clone, Copy, Debug)] -pub struct Translate -where - G: Generator, -{ +pub struct Translate { generator: G, translation: [f64; D], }