diff --git a/CHANGELOG.md b/CHANGELOG.md index ff0657ca..26037eeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ The format is based on [Keep a Changelog], and this project adheres to * Minimum Supported Version of Rust bumped to 1.57.0 to allow panicking in constant evaluation. +### Removed + +* Deleted deprecated `TransformRT` and `TransformSRT` types. + ## [0.20.5] - 2022-04-12 ### Fixed diff --git a/codegen/templates/affine.rs b/codegen/templates/affine.rs index 75141624..fc1e063e 100644 --- a/codegen/templates/affine.rs +++ b/codegen/templates/affine.rs @@ -581,7 +581,7 @@ impl {{ self_t }} { /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline] pub fn abs_diff_eq(&self, other: Self, max_abs_diff: {{ scalar_t }}) -> bool { - self.matrix{{ dim }}.abs_diff_eq(&other.matrix{{ dim }}, max_abs_diff) + self.matrix{{ dim }}.abs_diff_eq(other.matrix{{ dim }}, max_abs_diff) && self .translation .abs_diff_eq(other.translation, max_abs_diff) diff --git a/codegen/templates/mat.rs b/codegen/templates/mat.rs index bc7b1e02..009da48a 100644 --- a/codegen/templates/mat.rs +++ b/codegen/templates/mat.rs @@ -1013,7 +1013,7 @@ impl {{ self_t }} { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: {{ scalar_t }}) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: {{ scalar_t }}) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/affine2.rs b/src/f32/affine2.rs index 430e428b..8b467ecd 100644 --- a/src/f32/affine2.rs +++ b/src/f32/affine2.rs @@ -243,7 +243,7 @@ impl Affine2 { /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline] pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { - self.matrix2.abs_diff_eq(&other.matrix2, max_abs_diff) + self.matrix2.abs_diff_eq(other.matrix2, max_abs_diff) && self .translation .abs_diff_eq(other.translation, max_abs_diff) diff --git a/src/f32/affine3a.rs b/src/f32/affine3a.rs index cc0963d7..056e930d 100644 --- a/src/f32/affine3a.rs +++ b/src/f32/affine3a.rs @@ -401,7 +401,7 @@ impl Affine3A { /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline] pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { - self.matrix3.abs_diff_eq(&other.matrix3, max_abs_diff) + self.matrix3.abs_diff_eq(other.matrix3, max_abs_diff) && self .translation .abs_diff_eq(other.translation, max_abs_diff) diff --git a/src/f32/mat3.rs b/src/f32/mat3.rs index 09eccc0a..2c7d1757 100644 --- a/src/f32/mat3.rs +++ b/src/f32/mat3.rs @@ -389,7 +389,7 @@ impl Mat3 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/scalar/mat2.rs b/src/f32/scalar/mat2.rs index 5d8051f9..c6cebeac 100644 --- a/src/f32/scalar/mat2.rs +++ b/src/f32/scalar/mat2.rs @@ -249,7 +249,7 @@ impl Mat2 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/scalar/mat3a.rs b/src/f32/scalar/mat3a.rs index cfcdc628..c177b61e 100644 --- a/src/f32/scalar/mat3a.rs +++ b/src/f32/scalar/mat3a.rs @@ -389,7 +389,7 @@ impl Mat3A { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/scalar/mat4.rs b/src/f32/scalar/mat4.rs index e01c9eba..845b8aff 100644 --- a/src/f32/scalar/mat4.rs +++ b/src/f32/scalar/mat4.rs @@ -670,7 +670,7 @@ impl Mat4 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/sse2/mat2.rs b/src/f32/sse2/mat2.rs index d828e4b1..6e2fbc29 100644 --- a/src/f32/sse2/mat2.rs +++ b/src/f32/sse2/mat2.rs @@ -243,7 +243,7 @@ impl Mat2 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/sse2/mat3a.rs b/src/f32/sse2/mat3a.rs index 42d22d83..25d26e2e 100644 --- a/src/f32/sse2/mat3a.rs +++ b/src/f32/sse2/mat3a.rs @@ -391,7 +391,7 @@ impl Mat3A { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/sse2/mat4.rs b/src/f32/sse2/mat4.rs index 66b255a0..7301833c 100644 --- a/src/f32/sse2/mat4.rs +++ b/src/f32/sse2/mat4.rs @@ -661,7 +661,7 @@ impl Mat4 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/wasm32/mat2.rs b/src/f32/wasm32/mat2.rs index 92d1f1b1..e6b38ce9 100644 --- a/src/f32/wasm32/mat2.rs +++ b/src/f32/wasm32/mat2.rs @@ -240,7 +240,7 @@ impl Mat2 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/wasm32/mat3a.rs b/src/f32/wasm32/mat3a.rs index dea3b471..89c3a467 100644 --- a/src/f32/wasm32/mat3a.rs +++ b/src/f32/wasm32/mat3a.rs @@ -388,7 +388,7 @@ impl Mat3A { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f32/wasm32/mat4.rs b/src/f32/wasm32/mat4.rs index 0b48dfc2..cb05200b 100644 --- a/src/f32/wasm32/mat4.rs +++ b/src/f32/wasm32/mat4.rs @@ -658,7 +658,7 @@ impl Mat4 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f32) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f32) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f64/daffine2.rs b/src/f64/daffine2.rs index 92b9e774..cdb40da7 100644 --- a/src/f64/daffine2.rs +++ b/src/f64/daffine2.rs @@ -243,7 +243,7 @@ impl DAffine2 { /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline] pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f64) -> bool { - self.matrix2.abs_diff_eq(&other.matrix2, max_abs_diff) + self.matrix2.abs_diff_eq(other.matrix2, max_abs_diff) && self .translation .abs_diff_eq(other.translation, max_abs_diff) diff --git a/src/f64/daffine3.rs b/src/f64/daffine3.rs index cd499cf4..0727bf73 100644 --- a/src/f64/daffine3.rs +++ b/src/f64/daffine3.rs @@ -390,7 +390,7 @@ impl DAffine3 { /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline] pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f64) -> bool { - self.matrix3.abs_diff_eq(&other.matrix3, max_abs_diff) + self.matrix3.abs_diff_eq(other.matrix3, max_abs_diff) && self .translation .abs_diff_eq(other.translation, max_abs_diff) diff --git a/src/f64/dmat2.rs b/src/f64/dmat2.rs index 59d41b23..416ae9a3 100644 --- a/src/f64/dmat2.rs +++ b/src/f64/dmat2.rs @@ -239,7 +239,7 @@ impl DMat2 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f64) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f64) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f64/dmat3.rs b/src/f64/dmat3.rs index 913eeb2b..b18390f7 100644 --- a/src/f64/dmat3.rs +++ b/src/f64/dmat3.rs @@ -383,7 +383,7 @@ impl DMat3 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f64) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f64) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/src/f64/dmat4.rs b/src/f64/dmat4.rs index a7443f3e..4394e9fd 100644 --- a/src/f64/dmat4.rs +++ b/src/f64/dmat4.rs @@ -644,7 +644,7 @@ impl DMat4 { /// For more see /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). #[inline(always)] - pub fn abs_diff_eq(&self, other: &Self, max_abs_diff: f64) -> bool { + pub fn abs_diff_eq(&self, other: Self, max_abs_diff: f64) -> bool { self.0.abs_diff_eq(&other.0, max_abs_diff) } diff --git a/tests/support.rs b/tests/support.rs index 6018b2a8..08000e94 100644 --- a/tests/support.rs +++ b/tests/support.rs @@ -75,7 +75,7 @@ impl FloatCompare for f64 { impl FloatCompare for Mat2 { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff) + self.abs_diff_eq(*other, max_abs_diff) } #[inline] fn abs_diff(&self, other: &Self) -> Self { @@ -89,7 +89,7 @@ impl FloatCompare for Mat2 { impl FloatCompare for DMat2 { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff as f64) + self.abs_diff_eq(*other, max_abs_diff as f64) } #[inline] fn abs_diff(&self, other: &Self) -> Self { @@ -103,7 +103,7 @@ impl FloatCompare for DMat2 { impl FloatCompare for Mat3 { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff) + self.abs_diff_eq(*other, max_abs_diff) } #[inline] fn abs_diff(&self, other: &Self) -> Self { @@ -118,7 +118,7 @@ impl FloatCompare for Mat3 { impl FloatCompare for Mat3A { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff) + self.abs_diff_eq(*other, max_abs_diff) } #[inline] fn abs_diff(&self, other: &Self) -> Self { @@ -133,7 +133,7 @@ impl FloatCompare for Mat3A { impl FloatCompare for DMat3 { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff as f64) + self.abs_diff_eq(*other, max_abs_diff as f64) } #[inline] fn abs_diff(&self, other: &Self) -> Self { @@ -148,7 +148,7 @@ impl FloatCompare for DMat3 { impl FloatCompare for DMat4 { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff as f64) + self.abs_diff_eq(*other, max_abs_diff as f64) } #[inline] fn abs_diff(&self, other: &Self) -> Self { @@ -164,7 +164,7 @@ impl FloatCompare for DMat4 { impl FloatCompare for Mat4 { #[inline] fn approx_eq(&self, other: &Self, max_abs_diff: f32) -> bool { - self.abs_diff_eq(other, max_abs_diff) + self.abs_diff_eq(*other, max_abs_diff) } #[inline] fn abs_diff(&self, other: &Self) -> Self {