diff --git a/codegen/templates/vec.rs.tera b/codegen/templates/vec.rs.tera index b1c1ed6a..bacdbc75 100644 --- a/codegen/templates/vec.rs.tera +++ b/codegen/templates/vec.rs.tera @@ -2625,6 +2625,30 @@ impl Div<{{ self_t }}> for {{ self_t }} { } } +impl Div<&{{ self_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.div(*rhs) + } +} + +impl Div<&{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).div(*rhs) + } +} + +impl Div<{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).div(rhs) + } +} + impl DivAssign<{{ self_t }}> for {{ self_t }} { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -2646,6 +2670,13 @@ impl DivAssign<{{ self_t }}> for {{ self_t }} { } } +impl DivAssign<&Self> for {{ self_t }} { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div<{{ scalar_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -2670,6 +2701,30 @@ impl Div<{{ scalar_t }}> for {{ self_t }} { } } +impl Div<&{{ scalar_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + self.div(*rhs) + } +} + +impl Div<&{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + (*self).div(*rhs) + } +} + +impl Div<{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: {{ scalar_t }}) -> {{ self_t }} { + (*self).div(rhs) + } +} + impl DivAssign<{{ scalar_t }}> for {{ self_t }} { #[inline] fn div_assign(&mut self, rhs: {{ scalar_t }}) { @@ -2691,6 +2746,13 @@ impl DivAssign<{{ scalar_t }}> for {{ self_t }} { } } +impl DivAssign<&{{ scalar_t }}> for {{ self_t }} { + #[inline] + fn div_assign(&mut self, rhs: &{{ scalar_t }}) { + self.div_assign(*rhs) + } +} + impl Div<{{ self_t }}> for {{ scalar_t }} { type Output = {{ self_t }}; #[inline] @@ -2715,6 +2777,30 @@ impl Div<{{ self_t }}> for {{ scalar_t }} { } } +impl Div<&{{ self_t }}> for {{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.div(*rhs) + } +} + +impl Div<&{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).div(*rhs) + } +} + +impl Div<{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn div(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).div(rhs) + } +} + impl Mul<{{ self_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -2739,6 +2825,30 @@ impl Mul<{{ self_t }}> for {{ self_t }} { } } +impl Mul<&{{ self_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.mul(*rhs) + } +} + +impl Mul<&{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).mul(*rhs) + } +} + +impl Mul<{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).mul(rhs) + } +} + impl MulAssign<{{ self_t }}> for {{ self_t }} { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -2760,6 +2870,13 @@ impl MulAssign<{{ self_t }}> for {{ self_t }} { } } +impl MulAssign<&Self> for {{ self_t }} { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul<{{ scalar_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -2784,6 +2901,30 @@ impl Mul<{{ scalar_t }}> for {{ self_t }} { } } +impl Mul<&{{ scalar_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + self.mul(*rhs) + } +} + +impl Mul<&{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + (*self).mul(*rhs) + } +} + +impl Mul<{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: {{ scalar_t }}) -> {{ self_t }} { + (*self).mul(rhs) + } +} + impl MulAssign<{{ scalar_t }}> for {{ self_t }} { #[inline] fn mul_assign(&mut self, rhs: {{ scalar_t }}) { @@ -2805,6 +2946,13 @@ impl MulAssign<{{ scalar_t }}> for {{ self_t }} { } } +impl MulAssign<&{{ scalar_t }}> for {{ self_t }} { + #[inline] + fn mul_assign(&mut self, rhs: &{{ scalar_t }}) { + self.mul_assign(*rhs) + } +} + impl Mul<{{ self_t }}> for {{ scalar_t }} { type Output = {{ self_t }}; #[inline] @@ -2829,6 +2977,30 @@ impl Mul<{{ self_t }}> for {{ scalar_t }} { } } +impl Mul<&{{ self_t }}> for {{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.mul(*rhs) + } +} + +impl Mul<&{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).mul(*rhs) + } +} + +impl Mul<{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn mul(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).mul(rhs) + } +} + impl Add<{{ self_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -2853,6 +3025,30 @@ impl Add<{{ self_t }}> for {{ self_t }} { } } +impl Add<&{{ self_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.add(*rhs) + } +} + +impl Add<&{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).add(*rhs) + } +} + +impl Add<{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).add(rhs) + } +} + impl AddAssign<{{ self_t }}> for {{ self_t }} { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -2874,6 +3070,13 @@ impl AddAssign<{{ self_t }}> for {{ self_t }} { } } +impl AddAssign<&Self> for {{ self_t }} { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add<{{ scalar_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -2898,6 +3101,30 @@ impl Add<{{ scalar_t }}> for {{ self_t }} { } } +impl Add<&{{ scalar_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + self.add(*rhs) + } +} + +impl Add<&{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + (*self).add(*rhs) + } +} + +impl Add<{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: {{ scalar_t }}) -> {{ self_t }} { + (*self).add(rhs) + } +} + impl AddAssign<{{ scalar_t }}> for {{ self_t }} { #[inline] fn add_assign(&mut self, rhs: {{ scalar_t }}) { @@ -2919,6 +3146,13 @@ impl AddAssign<{{ scalar_t }}> for {{ self_t }} { } } +impl AddAssign<&{{ scalar_t }}> for {{ self_t }} { + #[inline] + fn add_assign(&mut self, rhs: &{{ scalar_t }}) { + self.add_assign(*rhs) + } +} + impl Add<{{ self_t }}> for {{ scalar_t }} { type Output = {{ self_t }}; #[inline] @@ -2943,6 +3177,30 @@ impl Add<{{ self_t }}> for {{ scalar_t }} { } } +impl Add<&{{ self_t }}> for {{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.add(*rhs) + } +} + +impl Add<&{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).add(*rhs) + } +} + +impl Add<{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn add(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).add(rhs) + } +} + impl Sub<{{ self_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -2967,6 +3225,30 @@ impl Sub<{{ self_t }}> for {{ self_t }} { } } +impl Sub<&{{ self_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.sub(*rhs) + } +} + +impl Sub<&{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).sub(*rhs) + } +} + +impl Sub<{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).sub(rhs) + } +} + impl SubAssign<{{ self_t }}> for {{ self_t }} { #[inline] fn sub_assign(&mut self, rhs: {{ self_t }}) { @@ -2988,6 +3270,13 @@ impl SubAssign<{{ self_t }}> for {{ self_t }} { } } +impl SubAssign<&Self> for {{ self_t }} { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub<{{ scalar_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -3012,6 +3301,30 @@ impl Sub<{{ scalar_t }}> for {{ self_t }} { } } +impl Sub<&{{ scalar_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + self.sub(*rhs) + } +} + +impl Sub<&{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + (*self).sub(*rhs) + } +} + +impl Sub<{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: {{ scalar_t }}) -> {{ self_t }} { + (*self).sub(rhs) + } +} + impl SubAssign<{{ scalar_t }}> for {{ self_t }} { #[inline] fn sub_assign(&mut self, rhs: {{ scalar_t }}) { @@ -3033,6 +3346,13 @@ impl SubAssign<{{ scalar_t }}> for {{ self_t }} { } } +impl SubAssign<&{{ scalar_t }}> for {{ self_t }} { + #[inline] + fn sub_assign(&mut self, rhs: &{{ scalar_t }}) { + self.sub_assign(*rhs) + } +} + impl Sub<{{ self_t }}> for {{ scalar_t }} { type Output = {{ self_t }}; #[inline] @@ -3057,6 +3377,30 @@ impl Sub<{{ self_t }}> for {{ scalar_t }} { } } +impl Sub<&{{ self_t }}> for {{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.sub(*rhs) + } +} + +impl Sub<&{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).sub(*rhs) + } +} + +impl Sub<{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn sub(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).sub(rhs) + } +} + impl Rem<{{ self_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -3088,6 +3432,30 @@ impl Rem<{{ self_t }}> for {{ self_t }} { } } +impl Rem<&{{ self_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.rem(*rhs) + } +} + +impl Rem<&{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).rem(*rhs) + } +} + +impl Rem<{{ self_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).rem(rhs) + } +} + impl RemAssign<{{ self_t }}> for {{ self_t }} { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -3103,6 +3471,13 @@ impl RemAssign<{{ self_t }}> for {{ self_t }} { } } +impl RemAssign<&Self> for {{ self_t }} { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem<{{ scalar_t }}> for {{ self_t }} { type Output = Self; #[inline] @@ -3119,6 +3494,30 @@ impl Rem<{{ scalar_t }}> for {{ self_t }} { } } +impl Rem<&{{ scalar_t }}> for {{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + self.rem(*rhs) + } +} + +impl Rem<&{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: &{{ scalar_t }}) -> {{ self_t }} { + (*self).rem(*rhs) + } +} + +impl Rem<{{ scalar_t }}> for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: {{ scalar_t }}) -> {{ self_t }} { + (*self).rem(rhs) + } +} + impl RemAssign<{{ scalar_t }}> for {{ self_t }} { #[inline] fn rem_assign(&mut self, rhs: {{ scalar_t }}) { @@ -3134,6 +3533,13 @@ impl RemAssign<{{ scalar_t }}> for {{ self_t }} { } } +impl RemAssign<&{{ scalar_t }}> for {{ self_t }} { + #[inline] + fn rem_assign(&mut self, rhs: &{{ scalar_t }}) { + self.rem_assign(*rhs) + } +} + impl Rem<{{ self_t }}> for {{ scalar_t }} { type Output = {{ self_t }}; #[inline] @@ -3150,6 +3556,30 @@ impl Rem<{{ self_t }}> for {{ scalar_t }} { } } +impl Rem<&{{ self_t }}> for {{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: &{{ self_t }}) -> {{ self_t }} { + self.rem(*rhs) + } +} + +impl Rem<&{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: &{{ self_t }}) -> {{ self_t }} { + (*self).rem(*rhs) + } +} + +impl Rem<{{ self_t }}> for &{{ scalar_t }} { + type Output = {{ self_t }}; + #[inline] + fn rem(self, rhs: {{ self_t }}) -> {{ self_t }} { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[{{ scalar_t }}; {{ dim }}]> for {{ self_t }} { #[inline] @@ -3230,6 +3660,14 @@ impl Neg for {{ self_t }} { {% endif %} } } + +impl Neg for &{{ self_t }} { + type Output = {{ self_t }}; + #[inline] + fn neg(self) -> {{ self_t }} { + (*self).neg() + } +} {% endif %} {% if not is_float %} diff --git a/src/f32/coresimd/vec3a.rs b/src/f32/coresimd/vec3a.rs index cc715f91..36fdeb55 100644 --- a/src/f32/coresimd/vec3a.rs +++ b/src/f32/coresimd/vec3a.rs @@ -1013,6 +1013,30 @@ impl Div for Vec3A { } } +impl Div<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1020,6 +1044,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&Self> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec3A { type Output = Self; #[inline] @@ -1028,6 +1059,30 @@ impl Div for Vec3A { } } +impl Div<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: f32) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1035,6 +1090,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&f32> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec3A; #[inline] @@ -1043,6 +1105,30 @@ impl Div for f32 { } } +impl Div<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1051,6 +1137,30 @@ impl Mul for Vec3A { } } +impl Mul<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1058,6 +1168,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&Self> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1066,6 +1183,30 @@ impl Mul for Vec3A { } } +impl Mul<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: f32) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1073,6 +1214,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&f32> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec3A; #[inline] @@ -1081,6 +1229,30 @@ impl Mul for f32 { } } +impl Mul<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1089,6 +1261,30 @@ impl Add for Vec3A { } } +impl Add<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1096,6 +1292,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&Self> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1104,6 +1307,30 @@ impl Add for Vec3A { } } +impl Add<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: f32) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1111,6 +1338,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&f32> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec3A; #[inline] @@ -1119,6 +1353,30 @@ impl Add for f32 { } } +impl Add<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1127,6 +1385,30 @@ impl Sub for Vec3A { } } +impl Sub<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: Vec3A) { @@ -1134,6 +1416,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&Self> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1142,6 +1431,30 @@ impl Sub for Vec3A { } } +impl Sub<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: f32) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1149,6 +1462,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&f32> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec3A; #[inline] @@ -1157,6 +1477,30 @@ impl Sub for f32 { } } +impl Sub<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1165,6 +1509,30 @@ impl Rem for Vec3A { } } +impl Rem<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1172,6 +1540,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&Self> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1180,6 +1555,30 @@ impl Rem for Vec3A { } } +impl Rem<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: f32) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1187,6 +1586,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&f32> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec3A; #[inline] @@ -1195,6 +1601,30 @@ impl Rem for f32 { } } +impl Rem<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 3]> for Vec3A { #[inline] @@ -1259,6 +1689,14 @@ impl Neg for Vec3A { } } +impl Neg for &Vec3A { + type Output = Vec3A; + #[inline] + fn neg(self) -> Vec3A { + (*self).neg() + } +} + impl Index for Vec3A { type Output = f32; #[inline] diff --git a/src/f32/coresimd/vec4.rs b/src/f32/coresimd/vec4.rs index 7876731f..232dfbdf 100644 --- a/src/f32/coresimd/vec4.rs +++ b/src/f32/coresimd/vec4.rs @@ -933,6 +933,30 @@ impl Div for Vec4 { } } +impl Div<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -940,6 +964,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&Self> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec4 { type Output = Self; #[inline] @@ -948,6 +979,30 @@ impl Div for Vec4 { } } +impl Div<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: f32) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -955,6 +1010,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&f32> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec4; #[inline] @@ -963,6 +1025,30 @@ impl Div for f32 { } } +impl Div<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -971,6 +1057,30 @@ impl Mul for Vec4 { } } +impl Mul<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -978,6 +1088,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&Self> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -986,6 +1103,30 @@ impl Mul for Vec4 { } } +impl Mul<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: f32) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -993,6 +1134,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&f32> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec4; #[inline] @@ -1001,6 +1149,30 @@ impl Mul for f32 { } } +impl Mul<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1009,6 +1181,30 @@ impl Add for Vec4 { } } +impl Add<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1016,6 +1212,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&Self> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1024,6 +1227,30 @@ impl Add for Vec4 { } } +impl Add<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: f32) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1031,6 +1258,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&f32> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec4; #[inline] @@ -1039,6 +1273,30 @@ impl Add for f32 { } } +impl Add<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1047,6 +1305,30 @@ impl Sub for Vec4 { } } +impl Sub<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: Vec4) { @@ -1054,6 +1336,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&Self> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1062,6 +1351,30 @@ impl Sub for Vec4 { } } +impl Sub<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: f32) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1069,6 +1382,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&f32> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec4; #[inline] @@ -1077,6 +1397,30 @@ impl Sub for f32 { } } +impl Sub<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1085,6 +1429,30 @@ impl Rem for Vec4 { } } +impl Rem<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1092,6 +1460,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&Self> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1100,6 +1475,30 @@ impl Rem for Vec4 { } } +impl Rem<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: f32) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1107,6 +1506,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&f32> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec4; #[inline] @@ -1115,6 +1521,30 @@ impl Rem for f32 { } } +impl Rem<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 4]> for Vec4 { #[inline] @@ -1179,6 +1609,14 @@ impl Neg for Vec4 { } } +impl Neg for &Vec4 { + type Output = Vec4; + #[inline] + fn neg(self) -> Vec4 { + (*self).neg() + } +} + impl Index for Vec4 { type Output = f32; #[inline] diff --git a/src/f32/neon/vec3a.rs b/src/f32/neon/vec3a.rs index a6e7f9ed..8e07e7fd 100644 --- a/src/f32/neon/vec3a.rs +++ b/src/f32/neon/vec3a.rs @@ -1057,6 +1057,30 @@ impl Div for Vec3A { } } +impl Div<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1064,6 +1088,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&Self> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec3A { type Output = Self; #[inline] @@ -1072,6 +1103,30 @@ impl Div for Vec3A { } } +impl Div<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: f32) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1079,6 +1134,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&f32> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec3A; #[inline] @@ -1087,6 +1149,30 @@ impl Div for f32 { } } +impl Div<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1095,6 +1181,30 @@ impl Mul for Vec3A { } } +impl Mul<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1102,6 +1212,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&Self> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1110,6 +1227,30 @@ impl Mul for Vec3A { } } +impl Mul<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: f32) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1117,6 +1258,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&f32> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec3A; #[inline] @@ -1125,6 +1273,30 @@ impl Mul for f32 { } } +impl Mul<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1133,6 +1305,30 @@ impl Add for Vec3A { } } +impl Add<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1140,6 +1336,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&Self> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1148,6 +1351,30 @@ impl Add for Vec3A { } } +impl Add<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: f32) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1155,6 +1382,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&f32> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec3A; #[inline] @@ -1163,6 +1397,30 @@ impl Add for f32 { } } +impl Add<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1171,6 +1429,30 @@ impl Sub for Vec3A { } } +impl Sub<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: Vec3A) { @@ -1178,6 +1460,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&Self> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1186,6 +1475,30 @@ impl Sub for Vec3A { } } +impl Sub<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: f32) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1193,6 +1506,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&f32> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec3A; #[inline] @@ -1201,6 +1521,30 @@ impl Sub for f32 { } } +impl Sub<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1212,6 +1556,30 @@ impl Rem for Vec3A { } } +impl Rem<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1219,6 +1587,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&Self> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1227,6 +1602,30 @@ impl Rem for Vec3A { } } +impl Rem<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: f32) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1234,6 +1633,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&f32> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec3A; #[inline] @@ -1242,6 +1648,30 @@ impl Rem for f32 { } } +impl Rem<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 3]> for Vec3A { #[inline] @@ -1306,6 +1736,14 @@ impl Neg for Vec3A { } } +impl Neg for &Vec3A { + type Output = Vec3A; + #[inline] + fn neg(self) -> Vec3A { + (*self).neg() + } +} + impl Index for Vec3A { type Output = f32; #[inline] diff --git a/src/f32/neon/vec4.rs b/src/f32/neon/vec4.rs index 296a3ebd..864abed7 100644 --- a/src/f32/neon/vec4.rs +++ b/src/f32/neon/vec4.rs @@ -967,6 +967,30 @@ impl Div for Vec4 { } } +impl Div<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -974,6 +998,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&Self> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec4 { type Output = Self; #[inline] @@ -982,6 +1013,30 @@ impl Div for Vec4 { } } +impl Div<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: f32) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -989,6 +1044,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&f32> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec4; #[inline] @@ -997,6 +1059,30 @@ impl Div for f32 { } } +impl Div<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1005,6 +1091,30 @@ impl Mul for Vec4 { } } +impl Mul<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1012,6 +1122,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&Self> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1020,6 +1137,30 @@ impl Mul for Vec4 { } } +impl Mul<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: f32) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1027,6 +1168,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&f32> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec4; #[inline] @@ -1035,6 +1183,30 @@ impl Mul for f32 { } } +impl Mul<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1043,6 +1215,30 @@ impl Add for Vec4 { } } +impl Add<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1050,6 +1246,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&Self> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1058,6 +1261,30 @@ impl Add for Vec4 { } } +impl Add<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: f32) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1065,6 +1292,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&f32> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec4; #[inline] @@ -1073,6 +1307,30 @@ impl Add for f32 { } } +impl Add<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1081,6 +1339,30 @@ impl Sub for Vec4 { } } +impl Sub<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: Vec4) { @@ -1088,6 +1370,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&Self> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1096,6 +1385,30 @@ impl Sub for Vec4 { } } +impl Sub<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: f32) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1103,6 +1416,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&f32> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec4; #[inline] @@ -1111,6 +1431,30 @@ impl Sub for f32 { } } +impl Sub<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1122,6 +1466,30 @@ impl Rem for Vec4 { } } +impl Rem<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1129,6 +1497,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&Self> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1137,6 +1512,30 @@ impl Rem for Vec4 { } } +impl Rem<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: f32) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1144,6 +1543,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&f32> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec4; #[inline] @@ -1152,6 +1558,30 @@ impl Rem for f32 { } } +impl Rem<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 4]> for Vec4 { #[inline] @@ -1216,6 +1646,14 @@ impl Neg for Vec4 { } } +impl Neg for &Vec4 { + type Output = Vec4; + #[inline] + fn neg(self) -> Vec4 { + (*self).neg() + } +} + impl Index for Vec4 { type Output = f32; #[inline] diff --git a/src/f32/scalar/vec3a.rs b/src/f32/scalar/vec3a.rs index abc3af03..001ad4b9 100644 --- a/src/f32/scalar/vec3a.rs +++ b/src/f32/scalar/vec3a.rs @@ -1057,6 +1057,30 @@ impl Div for Vec3A { } } +impl Div<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1066,6 +1090,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&Self> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec3A { type Output = Self; #[inline] @@ -1078,6 +1109,30 @@ impl Div for Vec3A { } } +impl Div<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: f32) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1087,6 +1142,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&f32> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec3A; #[inline] @@ -1099,6 +1161,30 @@ impl Div for f32 { } } +impl Div<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1111,6 +1197,30 @@ impl Mul for Vec3A { } } +impl Mul<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1120,6 +1230,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&Self> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1132,6 +1249,30 @@ impl Mul for Vec3A { } } +impl Mul<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: f32) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1141,6 +1282,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&f32> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec3A; #[inline] @@ -1153,6 +1301,30 @@ impl Mul for f32 { } } +impl Mul<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1165,6 +1337,30 @@ impl Add for Vec3A { } } +impl Add<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1174,6 +1370,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&Self> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1186,6 +1389,30 @@ impl Add for Vec3A { } } +impl Add<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: f32) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1195,6 +1422,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&f32> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec3A; #[inline] @@ -1207,6 +1441,30 @@ impl Add for f32 { } } +impl Add<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1219,6 +1477,30 @@ impl Sub for Vec3A { } } +impl Sub<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: Vec3A) { @@ -1228,6 +1510,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&Self> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1240,6 +1529,30 @@ impl Sub for Vec3A { } } +impl Sub<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: f32) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1249,6 +1562,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&f32> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec3A; #[inline] @@ -1261,6 +1581,30 @@ impl Sub for f32 { } } +impl Sub<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1273,6 +1617,30 @@ impl Rem for Vec3A { } } +impl Rem<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1282,6 +1650,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&Self> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1294,6 +1669,30 @@ impl Rem for Vec3A { } } +impl Rem<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: f32) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1303,6 +1702,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&f32> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec3A; #[inline] @@ -1315,6 +1721,30 @@ impl Rem for f32 { } } +impl Rem<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 3]> for Vec3A { #[inline] @@ -1383,6 +1813,14 @@ impl Neg for Vec3A { } } +impl Neg for &Vec3A { + type Output = Vec3A; + #[inline] + fn neg(self) -> Vec3A { + (*self).neg() + } +} + impl Index for Vec3A { type Output = f32; #[inline] diff --git a/src/f32/scalar/vec4.rs b/src/f32/scalar/vec4.rs index 68e881cc..e3205436 100644 --- a/src/f32/scalar/vec4.rs +++ b/src/f32/scalar/vec4.rs @@ -1050,6 +1050,30 @@ impl Div for Vec4 { } } +impl Div<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1060,6 +1084,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&Self> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec4 { type Output = Self; #[inline] @@ -1073,6 +1104,30 @@ impl Div for Vec4 { } } +impl Div<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: f32) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1083,6 +1138,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&f32> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec4; #[inline] @@ -1096,6 +1158,30 @@ impl Div for f32 { } } +impl Div<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1109,6 +1195,30 @@ impl Mul for Vec4 { } } +impl Mul<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1119,6 +1229,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&Self> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1132,6 +1249,30 @@ impl Mul for Vec4 { } } +impl Mul<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: f32) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1142,6 +1283,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&f32> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec4; #[inline] @@ -1155,6 +1303,30 @@ impl Mul for f32 { } } +impl Mul<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1168,6 +1340,30 @@ impl Add for Vec4 { } } +impl Add<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1178,6 +1374,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&Self> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1191,6 +1394,30 @@ impl Add for Vec4 { } } +impl Add<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: f32) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1201,6 +1428,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&f32> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec4; #[inline] @@ -1214,6 +1448,30 @@ impl Add for f32 { } } +impl Add<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1227,6 +1485,30 @@ impl Sub for Vec4 { } } +impl Sub<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: Vec4) { @@ -1237,6 +1519,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&Self> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1250,6 +1539,30 @@ impl Sub for Vec4 { } } +impl Sub<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: f32) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1260,6 +1573,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&f32> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec4; #[inline] @@ -1273,6 +1593,30 @@ impl Sub for f32 { } } +impl Sub<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1286,6 +1630,30 @@ impl Rem for Vec4 { } } +impl Rem<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1296,6 +1664,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&Self> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1309,6 +1684,30 @@ impl Rem for Vec4 { } } +impl Rem<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: f32) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1319,6 +1718,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&f32> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec4; #[inline] @@ -1332,6 +1738,30 @@ impl Rem for f32 { } } +impl Rem<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 4]> for Vec4 { #[inline] @@ -1401,6 +1831,14 @@ impl Neg for Vec4 { } } +impl Neg for &Vec4 { + type Output = Vec4; + #[inline] + fn neg(self) -> Vec4 { + (*self).neg() + } +} + impl Index for Vec4 { type Output = f32; #[inline] diff --git a/src/f32/sse2/vec3a.rs b/src/f32/sse2/vec3a.rs index 62f22bc9..12ecbb47 100644 --- a/src/f32/sse2/vec3a.rs +++ b/src/f32/sse2/vec3a.rs @@ -1065,6 +1065,30 @@ impl Div for Vec3A { } } +impl Div<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1072,6 +1096,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&Self> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec3A { type Output = Self; #[inline] @@ -1080,6 +1111,30 @@ impl Div for Vec3A { } } +impl Div<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: f32) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1087,6 +1142,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&f32> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec3A; #[inline] @@ -1095,6 +1157,30 @@ impl Div for f32 { } } +impl Div<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1103,6 +1189,30 @@ impl Mul for Vec3A { } } +impl Mul<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1110,6 +1220,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&Self> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1118,6 +1235,30 @@ impl Mul for Vec3A { } } +impl Mul<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: f32) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1125,6 +1266,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&f32> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec3A; #[inline] @@ -1133,6 +1281,30 @@ impl Mul for f32 { } } +impl Mul<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1141,6 +1313,30 @@ impl Add for Vec3A { } } +impl Add<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1148,6 +1344,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&Self> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1156,6 +1359,30 @@ impl Add for Vec3A { } } +impl Add<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: f32) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1163,6 +1390,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&f32> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec3A; #[inline] @@ -1171,6 +1405,30 @@ impl Add for f32 { } } +impl Add<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1179,6 +1437,30 @@ impl Sub for Vec3A { } } +impl Sub<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: Vec3A) { @@ -1186,6 +1468,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&Self> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1194,6 +1483,30 @@ impl Sub for Vec3A { } } +impl Sub<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: f32) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1201,6 +1514,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&f32> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec3A; #[inline] @@ -1209,6 +1529,30 @@ impl Sub for f32 { } } +impl Sub<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1220,6 +1564,30 @@ impl Rem for Vec3A { } } +impl Rem<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1227,6 +1595,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&Self> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1235,6 +1610,30 @@ impl Rem for Vec3A { } } +impl Rem<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: f32) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1242,6 +1641,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&f32> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec3A; #[inline] @@ -1250,6 +1656,30 @@ impl Rem for f32 { } } +impl Rem<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 3]> for Vec3A { #[inline] @@ -1314,6 +1744,14 @@ impl Neg for Vec3A { } } +impl Neg for &Vec3A { + type Output = Vec3A; + #[inline] + fn neg(self) -> Vec3A { + (*self).neg() + } +} + impl Index for Vec3A { type Output = f32; #[inline] diff --git a/src/f32/sse2/vec4.rs b/src/f32/sse2/vec4.rs index afb30e5a..25a54523 100644 --- a/src/f32/sse2/vec4.rs +++ b/src/f32/sse2/vec4.rs @@ -985,6 +985,30 @@ impl Div for Vec4 { } } +impl Div<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -992,6 +1016,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&Self> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec4 { type Output = Self; #[inline] @@ -1000,6 +1031,30 @@ impl Div for Vec4 { } } +impl Div<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: f32) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1007,6 +1062,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&f32> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec4; #[inline] @@ -1015,6 +1077,30 @@ impl Div for f32 { } } +impl Div<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1023,6 +1109,30 @@ impl Mul for Vec4 { } } +impl Mul<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1030,6 +1140,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&Self> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1038,6 +1155,30 @@ impl Mul for Vec4 { } } +impl Mul<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: f32) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1045,6 +1186,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&f32> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec4; #[inline] @@ -1053,6 +1201,30 @@ impl Mul for f32 { } } +impl Mul<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1061,6 +1233,30 @@ impl Add for Vec4 { } } +impl Add<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1068,6 +1264,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&Self> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1076,6 +1279,30 @@ impl Add for Vec4 { } } +impl Add<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: f32) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1083,6 +1310,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&f32> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec4; #[inline] @@ -1091,6 +1325,30 @@ impl Add for f32 { } } +impl Add<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1099,6 +1357,30 @@ impl Sub for Vec4 { } } +impl Sub<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: Vec4) { @@ -1106,6 +1388,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&Self> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1114,6 +1403,30 @@ impl Sub for Vec4 { } } +impl Sub<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: f32) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1121,6 +1434,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&f32> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec4; #[inline] @@ -1129,6 +1449,30 @@ impl Sub for f32 { } } +impl Sub<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1140,6 +1484,30 @@ impl Rem for Vec4 { } } +impl Rem<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1147,6 +1515,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&Self> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1155,6 +1530,30 @@ impl Rem for Vec4 { } } +impl Rem<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: f32) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1162,6 +1561,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&f32> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec4; #[inline] @@ -1170,6 +1576,30 @@ impl Rem for f32 { } } +impl Rem<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 4]> for Vec4 { #[inline] @@ -1234,6 +1664,14 @@ impl Neg for Vec4 { } } +impl Neg for &Vec4 { + type Output = Vec4; + #[inline] + fn neg(self) -> Vec4 { + (*self).neg() + } +} + impl Index for Vec4 { type Output = f32; #[inline] diff --git a/src/f32/vec2.rs b/src/f32/vec2.rs index fa2367ca..0427ea6e 100644 --- a/src/f32/vec2.rs +++ b/src/f32/vec2.rs @@ -1005,6 +1005,30 @@ impl Div for Vec2 { } } +impl Div<&Vec2> for Vec2 { + type Output = Vec2; + #[inline] + fn div(self, rhs: &Vec2) -> Vec2 { + self.div(*rhs) + } +} + +impl Div<&Vec2> for &Vec2 { + type Output = Vec2; + #[inline] + fn div(self, rhs: &Vec2) -> Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &Vec2 { + type Output = Vec2; + #[inline] + fn div(self, rhs: Vec2) -> Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for Vec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1013,6 +1037,13 @@ impl DivAssign for Vec2 { } } +impl DivAssign<&Self> for Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec2 { type Output = Self; #[inline] @@ -1024,6 +1055,30 @@ impl Div for Vec2 { } } +impl Div<&f32> for Vec2 { + type Output = Vec2; + #[inline] + fn div(self, rhs: &f32) -> Vec2 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec2 { + type Output = Vec2; + #[inline] + fn div(self, rhs: &f32) -> Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &Vec2 { + type Output = Vec2; + #[inline] + fn div(self, rhs: f32) -> Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for Vec2 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1032,6 +1087,13 @@ impl DivAssign for Vec2 { } } +impl DivAssign<&f32> for Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec2; #[inline] @@ -1043,6 +1105,30 @@ impl Div for f32 { } } +impl Div<&Vec2> for f32 { + type Output = Vec2; + #[inline] + fn div(self, rhs: &Vec2) -> Vec2 { + self.div(*rhs) + } +} + +impl Div<&Vec2> for &f32 { + type Output = Vec2; + #[inline] + fn div(self, rhs: &Vec2) -> Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec2; + #[inline] + fn div(self, rhs: Vec2) -> Vec2 { + (*self).div(rhs) + } +} + impl Mul for Vec2 { type Output = Self; #[inline] @@ -1054,6 +1140,30 @@ impl Mul for Vec2 { } } +impl Mul<&Vec2> for Vec2 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: &Vec2) -> Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&Vec2> for &Vec2 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: &Vec2) -> Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec2 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: Vec2) -> Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1062,6 +1172,13 @@ impl MulAssign for Vec2 { } } +impl MulAssign<&Self> for Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec2 { type Output = Self; #[inline] @@ -1073,6 +1190,30 @@ impl Mul for Vec2 { } } +impl Mul<&f32> for Vec2 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: &f32) -> Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec2 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: &f32) -> Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec2 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: f32) -> Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec2 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1081,6 +1222,13 @@ impl MulAssign for Vec2 { } } +impl MulAssign<&f32> for Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec2; #[inline] @@ -1092,6 +1240,30 @@ impl Mul for f32 { } } +impl Mul<&Vec2> for f32 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: &Vec2) -> Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&Vec2> for &f32 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: &Vec2) -> Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec2; + #[inline] + fn mul(self, rhs: Vec2) -> Vec2 { + (*self).mul(rhs) + } +} + impl Add for Vec2 { type Output = Self; #[inline] @@ -1103,6 +1275,30 @@ impl Add for Vec2 { } } +impl Add<&Vec2> for Vec2 { + type Output = Vec2; + #[inline] + fn add(self, rhs: &Vec2) -> Vec2 { + self.add(*rhs) + } +} + +impl Add<&Vec2> for &Vec2 { + type Output = Vec2; + #[inline] + fn add(self, rhs: &Vec2) -> Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &Vec2 { + type Output = Vec2; + #[inline] + fn add(self, rhs: Vec2) -> Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for Vec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1111,6 +1307,13 @@ impl AddAssign for Vec2 { } } +impl AddAssign<&Self> for Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec2 { type Output = Self; #[inline] @@ -1122,6 +1325,30 @@ impl Add for Vec2 { } } +impl Add<&f32> for Vec2 { + type Output = Vec2; + #[inline] + fn add(self, rhs: &f32) -> Vec2 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec2 { + type Output = Vec2; + #[inline] + fn add(self, rhs: &f32) -> Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &Vec2 { + type Output = Vec2; + #[inline] + fn add(self, rhs: f32) -> Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for Vec2 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1130,6 +1357,13 @@ impl AddAssign for Vec2 { } } +impl AddAssign<&f32> for Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec2; #[inline] @@ -1141,6 +1375,30 @@ impl Add for f32 { } } +impl Add<&Vec2> for f32 { + type Output = Vec2; + #[inline] + fn add(self, rhs: &Vec2) -> Vec2 { + self.add(*rhs) + } +} + +impl Add<&Vec2> for &f32 { + type Output = Vec2; + #[inline] + fn add(self, rhs: &Vec2) -> Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec2; + #[inline] + fn add(self, rhs: Vec2) -> Vec2 { + (*self).add(rhs) + } +} + impl Sub for Vec2 { type Output = Self; #[inline] @@ -1152,6 +1410,30 @@ impl Sub for Vec2 { } } +impl Sub<&Vec2> for Vec2 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: &Vec2) -> Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&Vec2> for &Vec2 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: &Vec2) -> Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec2 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: Vec2) -> Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec2 { #[inline] fn sub_assign(&mut self, rhs: Vec2) { @@ -1160,6 +1442,13 @@ impl SubAssign for Vec2 { } } +impl SubAssign<&Self> for Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec2 { type Output = Self; #[inline] @@ -1171,6 +1460,30 @@ impl Sub for Vec2 { } } +impl Sub<&f32> for Vec2 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: &f32) -> Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec2 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: &f32) -> Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec2 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: f32) -> Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec2 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1179,6 +1492,13 @@ impl SubAssign for Vec2 { } } +impl SubAssign<&f32> for Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec2; #[inline] @@ -1190,6 +1510,30 @@ impl Sub for f32 { } } +impl Sub<&Vec2> for f32 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: &Vec2) -> Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&Vec2> for &f32 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: &Vec2) -> Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec2; + #[inline] + fn sub(self, rhs: Vec2) -> Vec2 { + (*self).sub(rhs) + } +} + impl Rem for Vec2 { type Output = Self; #[inline] @@ -1201,6 +1545,30 @@ impl Rem for Vec2 { } } +impl Rem<&Vec2> for Vec2 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: &Vec2) -> Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&Vec2> for &Vec2 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: &Vec2) -> Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec2 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: Vec2) -> Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1209,6 +1577,13 @@ impl RemAssign for Vec2 { } } +impl RemAssign<&Self> for Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec2 { type Output = Self; #[inline] @@ -1220,6 +1595,30 @@ impl Rem for Vec2 { } } +impl Rem<&f32> for Vec2 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: &f32) -> Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec2 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: &f32) -> Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec2 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: f32) -> Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec2 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1228,6 +1627,13 @@ impl RemAssign for Vec2 { } } +impl RemAssign<&f32> for Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec2; #[inline] @@ -1239,6 +1645,30 @@ impl Rem for f32 { } } +impl Rem<&Vec2> for f32 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: &Vec2) -> Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&Vec2> for &f32 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: &Vec2) -> Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec2; + #[inline] + fn rem(self, rhs: Vec2) -> Vec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 2]> for Vec2 { #[inline] @@ -1306,6 +1736,14 @@ impl Neg for Vec2 { } } +impl Neg for &Vec2 { + type Output = Vec2; + #[inline] + fn neg(self) -> Vec2 { + (*self).neg() + } +} + impl Index for Vec2 { type Output = f32; #[inline] diff --git a/src/f32/vec3.rs b/src/f32/vec3.rs index 2e8df473..bb40eb1c 100644 --- a/src/f32/vec3.rs +++ b/src/f32/vec3.rs @@ -1047,6 +1047,30 @@ impl Div for Vec3 { } } +impl Div<&Vec3> for Vec3 { + type Output = Vec3; + #[inline] + fn div(self, rhs: &Vec3) -> Vec3 { + self.div(*rhs) + } +} + +impl Div<&Vec3> for &Vec3 { + type Output = Vec3; + #[inline] + fn div(self, rhs: &Vec3) -> Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &Vec3 { + type Output = Vec3; + #[inline] + fn div(self, rhs: Vec3) -> Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for Vec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1056,6 +1080,13 @@ impl DivAssign for Vec3 { } } +impl DivAssign<&Self> for Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec3 { type Output = Self; #[inline] @@ -1068,6 +1099,30 @@ impl Div for Vec3 { } } +impl Div<&f32> for Vec3 { + type Output = Vec3; + #[inline] + fn div(self, rhs: &f32) -> Vec3 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec3 { + type Output = Vec3; + #[inline] + fn div(self, rhs: &f32) -> Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &Vec3 { + type Output = Vec3; + #[inline] + fn div(self, rhs: f32) -> Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for Vec3 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1077,6 +1132,13 @@ impl DivAssign for Vec3 { } } +impl DivAssign<&f32> for Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec3; #[inline] @@ -1089,6 +1151,30 @@ impl Div for f32 { } } +impl Div<&Vec3> for f32 { + type Output = Vec3; + #[inline] + fn div(self, rhs: &Vec3) -> Vec3 { + self.div(*rhs) + } +} + +impl Div<&Vec3> for &f32 { + type Output = Vec3; + #[inline] + fn div(self, rhs: &Vec3) -> Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec3; + #[inline] + fn div(self, rhs: Vec3) -> Vec3 { + (*self).div(rhs) + } +} + impl Mul for Vec3 { type Output = Self; #[inline] @@ -1101,6 +1187,30 @@ impl Mul for Vec3 { } } +impl Mul<&Vec3> for Vec3 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: &Vec3) -> Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&Vec3> for &Vec3 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: &Vec3) -> Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: Vec3) -> Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1110,6 +1220,13 @@ impl MulAssign for Vec3 { } } +impl MulAssign<&Self> for Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec3 { type Output = Self; #[inline] @@ -1122,6 +1239,30 @@ impl Mul for Vec3 { } } +impl Mul<&f32> for Vec3 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: &f32) -> Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec3 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: &f32) -> Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: f32) -> Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1131,6 +1272,13 @@ impl MulAssign for Vec3 { } } +impl MulAssign<&f32> for Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec3; #[inline] @@ -1143,6 +1291,30 @@ impl Mul for f32 { } } +impl Mul<&Vec3> for f32 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: &Vec3) -> Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&Vec3> for &f32 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: &Vec3) -> Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec3; + #[inline] + fn mul(self, rhs: Vec3) -> Vec3 { + (*self).mul(rhs) + } +} + impl Add for Vec3 { type Output = Self; #[inline] @@ -1155,6 +1327,30 @@ impl Add for Vec3 { } } +impl Add<&Vec3> for Vec3 { + type Output = Vec3; + #[inline] + fn add(self, rhs: &Vec3) -> Vec3 { + self.add(*rhs) + } +} + +impl Add<&Vec3> for &Vec3 { + type Output = Vec3; + #[inline] + fn add(self, rhs: &Vec3) -> Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &Vec3 { + type Output = Vec3; + #[inline] + fn add(self, rhs: Vec3) -> Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for Vec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1164,6 +1360,13 @@ impl AddAssign for Vec3 { } } +impl AddAssign<&Self> for Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec3 { type Output = Self; #[inline] @@ -1176,6 +1379,30 @@ impl Add for Vec3 { } } +impl Add<&f32> for Vec3 { + type Output = Vec3; + #[inline] + fn add(self, rhs: &f32) -> Vec3 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec3 { + type Output = Vec3; + #[inline] + fn add(self, rhs: &f32) -> Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &Vec3 { + type Output = Vec3; + #[inline] + fn add(self, rhs: f32) -> Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for Vec3 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1185,6 +1412,13 @@ impl AddAssign for Vec3 { } } +impl AddAssign<&f32> for Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec3; #[inline] @@ -1197,6 +1431,30 @@ impl Add for f32 { } } +impl Add<&Vec3> for f32 { + type Output = Vec3; + #[inline] + fn add(self, rhs: &Vec3) -> Vec3 { + self.add(*rhs) + } +} + +impl Add<&Vec3> for &f32 { + type Output = Vec3; + #[inline] + fn add(self, rhs: &Vec3) -> Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec3; + #[inline] + fn add(self, rhs: Vec3) -> Vec3 { + (*self).add(rhs) + } +} + impl Sub for Vec3 { type Output = Self; #[inline] @@ -1209,6 +1467,30 @@ impl Sub for Vec3 { } } +impl Sub<&Vec3> for Vec3 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: &Vec3) -> Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&Vec3> for &Vec3 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: &Vec3) -> Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: Vec3) -> Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3 { #[inline] fn sub_assign(&mut self, rhs: Vec3) { @@ -1218,6 +1500,13 @@ impl SubAssign for Vec3 { } } +impl SubAssign<&Self> for Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec3 { type Output = Self; #[inline] @@ -1230,6 +1519,30 @@ impl Sub for Vec3 { } } +impl Sub<&f32> for Vec3 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: &f32) -> Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec3 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: &f32) -> Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: f32) -> Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1239,6 +1552,13 @@ impl SubAssign for Vec3 { } } +impl SubAssign<&f32> for Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec3; #[inline] @@ -1251,6 +1571,30 @@ impl Sub for f32 { } } +impl Sub<&Vec3> for f32 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: &Vec3) -> Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&Vec3> for &f32 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: &Vec3) -> Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec3; + #[inline] + fn sub(self, rhs: Vec3) -> Vec3 { + (*self).sub(rhs) + } +} + impl Rem for Vec3 { type Output = Self; #[inline] @@ -1263,6 +1607,30 @@ impl Rem for Vec3 { } } +impl Rem<&Vec3> for Vec3 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: &Vec3) -> Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&Vec3> for &Vec3 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: &Vec3) -> Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: Vec3) -> Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1272,6 +1640,13 @@ impl RemAssign for Vec3 { } } +impl RemAssign<&Self> for Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec3 { type Output = Self; #[inline] @@ -1284,6 +1659,30 @@ impl Rem for Vec3 { } } +impl Rem<&f32> for Vec3 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: &f32) -> Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec3 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: &f32) -> Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: f32) -> Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1293,6 +1692,13 @@ impl RemAssign for Vec3 { } } +impl RemAssign<&f32> for Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec3; #[inline] @@ -1305,6 +1711,30 @@ impl Rem for f32 { } } +impl Rem<&Vec3> for f32 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: &Vec3) -> Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&Vec3> for &f32 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: &Vec3) -> Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec3; + #[inline] + fn rem(self, rhs: Vec3) -> Vec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 3]> for Vec3 { #[inline] @@ -1373,6 +1803,14 @@ impl Neg for Vec3 { } } +impl Neg for &Vec3 { + type Output = Vec3; + #[inline] + fn neg(self) -> Vec3 { + (*self).neg() + } +} + impl Index for Vec3 { type Output = f32; #[inline] diff --git a/src/f32/wasm32/vec3a.rs b/src/f32/wasm32/vec3a.rs index 1c5393a2..83338544 100644 --- a/src/f32/wasm32/vec3a.rs +++ b/src/f32/wasm32/vec3a.rs @@ -1028,6 +1028,30 @@ impl Div for Vec3A { } } +impl Div<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1035,6 +1059,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&Self> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec3A { type Output = Self; #[inline] @@ -1043,6 +1074,30 @@ impl Div for Vec3A { } } +impl Div<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &f32) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &Vec3A { + type Output = Vec3A; + #[inline] + fn div(self, rhs: f32) -> Vec3A { + (*self).div(rhs) + } +} + impl DivAssign for Vec3A { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -1050,6 +1105,13 @@ impl DivAssign for Vec3A { } } +impl DivAssign<&f32> for Vec3A { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec3A; #[inline] @@ -1058,6 +1120,30 @@ impl Div for f32 { } } +impl Div<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + self.div(*rhs) + } +} + +impl Div<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: &Vec3A) -> Vec3A { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec3A; + #[inline] + fn div(self, rhs: Vec3A) -> Vec3A { + (*self).div(rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1066,6 +1152,30 @@ impl Mul for Vec3A { } } +impl Mul<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1073,6 +1183,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&Self> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec3A { type Output = Self; #[inline] @@ -1081,6 +1198,30 @@ impl Mul for Vec3A { } } +impl Mul<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &f32) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec3A { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: f32) -> Vec3A { + (*self).mul(rhs) + } +} + impl MulAssign for Vec3A { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1088,6 +1229,13 @@ impl MulAssign for Vec3A { } } +impl MulAssign<&f32> for Vec3A { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec3A; #[inline] @@ -1096,6 +1244,30 @@ impl Mul for f32 { } } +impl Mul<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + self.mul(*rhs) + } +} + +impl Mul<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: &Vec3A) -> Vec3A { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec3A; + #[inline] + fn mul(self, rhs: Vec3A) -> Vec3A { + (*self).mul(rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1104,6 +1276,30 @@ impl Add for Vec3A { } } +impl Add<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1111,6 +1307,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&Self> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec3A { type Output = Self; #[inline] @@ -1119,6 +1322,30 @@ impl Add for Vec3A { } } +impl Add<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &f32) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &Vec3A { + type Output = Vec3A; + #[inline] + fn add(self, rhs: f32) -> Vec3A { + (*self).add(rhs) + } +} + impl AddAssign for Vec3A { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1126,6 +1353,13 @@ impl AddAssign for Vec3A { } } +impl AddAssign<&f32> for Vec3A { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec3A; #[inline] @@ -1134,6 +1368,30 @@ impl Add for f32 { } } +impl Add<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + self.add(*rhs) + } +} + +impl Add<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: &Vec3A) -> Vec3A { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec3A; + #[inline] + fn add(self, rhs: Vec3A) -> Vec3A { + (*self).add(rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1142,6 +1400,30 @@ impl Sub for Vec3A { } } +impl Sub<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: Vec3A) { @@ -1149,6 +1431,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&Self> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec3A { type Output = Self; #[inline] @@ -1157,6 +1446,30 @@ impl Sub for Vec3A { } } +impl Sub<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &f32) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec3A { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: f32) -> Vec3A { + (*self).sub(rhs) + } +} + impl SubAssign for Vec3A { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1164,6 +1477,13 @@ impl SubAssign for Vec3A { } } +impl SubAssign<&f32> for Vec3A { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec3A; #[inline] @@ -1172,6 +1492,30 @@ impl Sub for f32 { } } +impl Sub<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + self.sub(*rhs) + } +} + +impl Sub<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: &Vec3A) -> Vec3A { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec3A; + #[inline] + fn sub(self, rhs: Vec3A) -> Vec3A { + (*self).sub(rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1181,6 +1525,30 @@ impl Rem for Vec3A { } } +impl Rem<&Vec3A> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1188,6 +1556,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&Self> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec3A { type Output = Self; #[inline] @@ -1196,6 +1571,30 @@ impl Rem for Vec3A { } } +impl Rem<&f32> for Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &f32) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec3A { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: f32) -> Vec3A { + (*self).rem(rhs) + } +} + impl RemAssign for Vec3A { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1203,6 +1602,13 @@ impl RemAssign for Vec3A { } } +impl RemAssign<&f32> for Vec3A { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec3A; #[inline] @@ -1211,6 +1617,30 @@ impl Rem for f32 { } } +impl Rem<&Vec3A> for f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + self.rem(*rhs) + } +} + +impl Rem<&Vec3A> for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: &Vec3A) -> Vec3A { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec3A; + #[inline] + fn rem(self, rhs: Vec3A) -> Vec3A { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 3]> for Vec3A { #[inline] @@ -1275,6 +1705,14 @@ impl Neg for Vec3A { } } +impl Neg for &Vec3A { + type Output = Vec3A; + #[inline] + fn neg(self) -> Vec3A { + (*self).neg() + } +} + impl Index for Vec3A { type Output = f32; #[inline] diff --git a/src/f32/wasm32/vec4.rs b/src/f32/wasm32/vec4.rs index 6037a089..9f1d3784 100644 --- a/src/f32/wasm32/vec4.rs +++ b/src/f32/wasm32/vec4.rs @@ -955,6 +955,30 @@ impl Div for Vec4 { } } +impl Div<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -962,6 +986,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&Self> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for Vec4 { type Output = Self; #[inline] @@ -970,6 +1001,30 @@ impl Div for Vec4 { } } +impl Div<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &f32) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &Vec4 { + type Output = Vec4; + #[inline] + fn div(self, rhs: f32) -> Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for Vec4 { #[inline] fn div_assign(&mut self, rhs: f32) { @@ -977,6 +1032,13 @@ impl DivAssign for Vec4 { } } +impl DivAssign<&f32> for Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &f32) { + self.div_assign(*rhs) + } +} + impl Div for f32 { type Output = Vec4; #[inline] @@ -985,6 +1047,30 @@ impl Div for f32 { } } +impl Div<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + self.div(*rhs) + } +} + +impl Div<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: &Vec4) -> Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &f32 { + type Output = Vec4; + #[inline] + fn div(self, rhs: Vec4) -> Vec4 { + (*self).div(rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -993,6 +1079,30 @@ impl Mul for Vec4 { } } +impl Mul<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1000,6 +1110,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&Self> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for Vec4 { type Output = Self; #[inline] @@ -1008,6 +1125,30 @@ impl Mul for Vec4 { } } +impl Mul<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &f32) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &Vec4 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: f32) -> Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for Vec4 { #[inline] fn mul_assign(&mut self, rhs: f32) { @@ -1015,6 +1156,13 @@ impl MulAssign for Vec4 { } } +impl MulAssign<&f32> for Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &f32) { + self.mul_assign(*rhs) + } +} + impl Mul for f32 { type Output = Vec4; #[inline] @@ -1023,6 +1171,30 @@ impl Mul for f32 { } } +impl Mul<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: &Vec4) -> Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &f32 { + type Output = Vec4; + #[inline] + fn mul(self, rhs: Vec4) -> Vec4 { + (*self).mul(rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1031,6 +1203,30 @@ impl Add for Vec4 { } } +impl Add<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1038,6 +1234,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&Self> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for Vec4 { type Output = Self; #[inline] @@ -1046,6 +1249,30 @@ impl Add for Vec4 { } } +impl Add<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &f32) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &Vec4 { + type Output = Vec4; + #[inline] + fn add(self, rhs: f32) -> Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for Vec4 { #[inline] fn add_assign(&mut self, rhs: f32) { @@ -1053,6 +1280,13 @@ impl AddAssign for Vec4 { } } +impl AddAssign<&f32> for Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &f32) { + self.add_assign(*rhs) + } +} + impl Add for f32 { type Output = Vec4; #[inline] @@ -1061,6 +1295,30 @@ impl Add for f32 { } } +impl Add<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + self.add(*rhs) + } +} + +impl Add<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: &Vec4) -> Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &f32 { + type Output = Vec4; + #[inline] + fn add(self, rhs: Vec4) -> Vec4 { + (*self).add(rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1069,6 +1327,30 @@ impl Sub for Vec4 { } } +impl Sub<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: Vec4) { @@ -1076,6 +1358,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&Self> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for Vec4 { type Output = Self; #[inline] @@ -1084,6 +1373,30 @@ impl Sub for Vec4 { } } +impl Sub<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &f32) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &Vec4 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: f32) -> Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for Vec4 { #[inline] fn sub_assign(&mut self, rhs: f32) { @@ -1091,6 +1404,13 @@ impl SubAssign for Vec4 { } } +impl SubAssign<&f32> for Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &f32) { + self.sub_assign(*rhs) + } +} + impl Sub for f32 { type Output = Vec4; #[inline] @@ -1099,6 +1419,30 @@ impl Sub for f32 { } } +impl Sub<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: &Vec4) -> Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &f32 { + type Output = Vec4; + #[inline] + fn sub(self, rhs: Vec4) -> Vec4 { + (*self).sub(rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1108,6 +1452,30 @@ impl Rem for Vec4 { } } +impl Rem<&Vec4> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1115,6 +1483,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&Self> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for Vec4 { type Output = Self; #[inline] @@ -1123,6 +1498,30 @@ impl Rem for Vec4 { } } +impl Rem<&f32> for Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&f32> for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &f32) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &Vec4 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: f32) -> Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for Vec4 { #[inline] fn rem_assign(&mut self, rhs: f32) { @@ -1130,6 +1529,13 @@ impl RemAssign for Vec4 { } } +impl RemAssign<&f32> for Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &f32) { + self.rem_assign(*rhs) + } +} + impl Rem for f32 { type Output = Vec4; #[inline] @@ -1138,6 +1544,30 @@ impl Rem for f32 { } } +impl Rem<&Vec4> for f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&Vec4> for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: &Vec4) -> Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &f32 { + type Output = Vec4; + #[inline] + fn rem(self, rhs: Vec4) -> Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f32; 4]> for Vec4 { #[inline] @@ -1202,6 +1632,14 @@ impl Neg for Vec4 { } } +impl Neg for &Vec4 { + type Output = Vec4; + #[inline] + fn neg(self) -> Vec4 { + (*self).neg() + } +} + impl Index for Vec4 { type Output = f32; #[inline] diff --git a/src/f64/dvec2.rs b/src/f64/dvec2.rs index 25e83fad..34a69bbc 100644 --- a/src/f64/dvec2.rs +++ b/src/f64/dvec2.rs @@ -1005,6 +1005,30 @@ impl Div for DVec2 { } } +impl Div<&DVec2> for DVec2 { + type Output = DVec2; + #[inline] + fn div(self, rhs: &DVec2) -> DVec2 { + self.div(*rhs) + } +} + +impl Div<&DVec2> for &DVec2 { + type Output = DVec2; + #[inline] + fn div(self, rhs: &DVec2) -> DVec2 { + (*self).div(*rhs) + } +} + +impl Div for &DVec2 { + type Output = DVec2; + #[inline] + fn div(self, rhs: DVec2) -> DVec2 { + (*self).div(rhs) + } +} + impl DivAssign for DVec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1013,6 +1037,13 @@ impl DivAssign for DVec2 { } } +impl DivAssign<&Self> for DVec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for DVec2 { type Output = Self; #[inline] @@ -1024,6 +1055,30 @@ impl Div for DVec2 { } } +impl Div<&f64> for DVec2 { + type Output = DVec2; + #[inline] + fn div(self, rhs: &f64) -> DVec2 { + self.div(*rhs) + } +} + +impl Div<&f64> for &DVec2 { + type Output = DVec2; + #[inline] + fn div(self, rhs: &f64) -> DVec2 { + (*self).div(*rhs) + } +} + +impl Div for &DVec2 { + type Output = DVec2; + #[inline] + fn div(self, rhs: f64) -> DVec2 { + (*self).div(rhs) + } +} + impl DivAssign for DVec2 { #[inline] fn div_assign(&mut self, rhs: f64) { @@ -1032,6 +1087,13 @@ impl DivAssign for DVec2 { } } +impl DivAssign<&f64> for DVec2 { + #[inline] + fn div_assign(&mut self, rhs: &f64) { + self.div_assign(*rhs) + } +} + impl Div for f64 { type Output = DVec2; #[inline] @@ -1043,6 +1105,30 @@ impl Div for f64 { } } +impl Div<&DVec2> for f64 { + type Output = DVec2; + #[inline] + fn div(self, rhs: &DVec2) -> DVec2 { + self.div(*rhs) + } +} + +impl Div<&DVec2> for &f64 { + type Output = DVec2; + #[inline] + fn div(self, rhs: &DVec2) -> DVec2 { + (*self).div(*rhs) + } +} + +impl Div for &f64 { + type Output = DVec2; + #[inline] + fn div(self, rhs: DVec2) -> DVec2 { + (*self).div(rhs) + } +} + impl Mul for DVec2 { type Output = Self; #[inline] @@ -1054,6 +1140,30 @@ impl Mul for DVec2 { } } +impl Mul<&DVec2> for DVec2 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: &DVec2) -> DVec2 { + self.mul(*rhs) + } +} + +impl Mul<&DVec2> for &DVec2 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: &DVec2) -> DVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &DVec2 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: DVec2) -> DVec2 { + (*self).mul(rhs) + } +} + impl MulAssign for DVec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1062,6 +1172,13 @@ impl MulAssign for DVec2 { } } +impl MulAssign<&Self> for DVec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for DVec2 { type Output = Self; #[inline] @@ -1073,6 +1190,30 @@ impl Mul for DVec2 { } } +impl Mul<&f64> for DVec2 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: &f64) -> DVec2 { + self.mul(*rhs) + } +} + +impl Mul<&f64> for &DVec2 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: &f64) -> DVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &DVec2 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: f64) -> DVec2 { + (*self).mul(rhs) + } +} + impl MulAssign for DVec2 { #[inline] fn mul_assign(&mut self, rhs: f64) { @@ -1081,6 +1222,13 @@ impl MulAssign for DVec2 { } } +impl MulAssign<&f64> for DVec2 { + #[inline] + fn mul_assign(&mut self, rhs: &f64) { + self.mul_assign(*rhs) + } +} + impl Mul for f64 { type Output = DVec2; #[inline] @@ -1092,6 +1240,30 @@ impl Mul for f64 { } } +impl Mul<&DVec2> for f64 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: &DVec2) -> DVec2 { + self.mul(*rhs) + } +} + +impl Mul<&DVec2> for &f64 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: &DVec2) -> DVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &f64 { + type Output = DVec2; + #[inline] + fn mul(self, rhs: DVec2) -> DVec2 { + (*self).mul(rhs) + } +} + impl Add for DVec2 { type Output = Self; #[inline] @@ -1103,6 +1275,30 @@ impl Add for DVec2 { } } +impl Add<&DVec2> for DVec2 { + type Output = DVec2; + #[inline] + fn add(self, rhs: &DVec2) -> DVec2 { + self.add(*rhs) + } +} + +impl Add<&DVec2> for &DVec2 { + type Output = DVec2; + #[inline] + fn add(self, rhs: &DVec2) -> DVec2 { + (*self).add(*rhs) + } +} + +impl Add for &DVec2 { + type Output = DVec2; + #[inline] + fn add(self, rhs: DVec2) -> DVec2 { + (*self).add(rhs) + } +} + impl AddAssign for DVec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1111,6 +1307,13 @@ impl AddAssign for DVec2 { } } +impl AddAssign<&Self> for DVec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for DVec2 { type Output = Self; #[inline] @@ -1122,6 +1325,30 @@ impl Add for DVec2 { } } +impl Add<&f64> for DVec2 { + type Output = DVec2; + #[inline] + fn add(self, rhs: &f64) -> DVec2 { + self.add(*rhs) + } +} + +impl Add<&f64> for &DVec2 { + type Output = DVec2; + #[inline] + fn add(self, rhs: &f64) -> DVec2 { + (*self).add(*rhs) + } +} + +impl Add for &DVec2 { + type Output = DVec2; + #[inline] + fn add(self, rhs: f64) -> DVec2 { + (*self).add(rhs) + } +} + impl AddAssign for DVec2 { #[inline] fn add_assign(&mut self, rhs: f64) { @@ -1130,6 +1357,13 @@ impl AddAssign for DVec2 { } } +impl AddAssign<&f64> for DVec2 { + #[inline] + fn add_assign(&mut self, rhs: &f64) { + self.add_assign(*rhs) + } +} + impl Add for f64 { type Output = DVec2; #[inline] @@ -1141,6 +1375,30 @@ impl Add for f64 { } } +impl Add<&DVec2> for f64 { + type Output = DVec2; + #[inline] + fn add(self, rhs: &DVec2) -> DVec2 { + self.add(*rhs) + } +} + +impl Add<&DVec2> for &f64 { + type Output = DVec2; + #[inline] + fn add(self, rhs: &DVec2) -> DVec2 { + (*self).add(*rhs) + } +} + +impl Add for &f64 { + type Output = DVec2; + #[inline] + fn add(self, rhs: DVec2) -> DVec2 { + (*self).add(rhs) + } +} + impl Sub for DVec2 { type Output = Self; #[inline] @@ -1152,6 +1410,30 @@ impl Sub for DVec2 { } } +impl Sub<&DVec2> for DVec2 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: &DVec2) -> DVec2 { + self.sub(*rhs) + } +} + +impl Sub<&DVec2> for &DVec2 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: &DVec2) -> DVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &DVec2 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: DVec2) -> DVec2 { + (*self).sub(rhs) + } +} + impl SubAssign for DVec2 { #[inline] fn sub_assign(&mut self, rhs: DVec2) { @@ -1160,6 +1442,13 @@ impl SubAssign for DVec2 { } } +impl SubAssign<&Self> for DVec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for DVec2 { type Output = Self; #[inline] @@ -1171,6 +1460,30 @@ impl Sub for DVec2 { } } +impl Sub<&f64> for DVec2 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: &f64) -> DVec2 { + self.sub(*rhs) + } +} + +impl Sub<&f64> for &DVec2 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: &f64) -> DVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &DVec2 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: f64) -> DVec2 { + (*self).sub(rhs) + } +} + impl SubAssign for DVec2 { #[inline] fn sub_assign(&mut self, rhs: f64) { @@ -1179,6 +1492,13 @@ impl SubAssign for DVec2 { } } +impl SubAssign<&f64> for DVec2 { + #[inline] + fn sub_assign(&mut self, rhs: &f64) { + self.sub_assign(*rhs) + } +} + impl Sub for f64 { type Output = DVec2; #[inline] @@ -1190,6 +1510,30 @@ impl Sub for f64 { } } +impl Sub<&DVec2> for f64 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: &DVec2) -> DVec2 { + self.sub(*rhs) + } +} + +impl Sub<&DVec2> for &f64 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: &DVec2) -> DVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &f64 { + type Output = DVec2; + #[inline] + fn sub(self, rhs: DVec2) -> DVec2 { + (*self).sub(rhs) + } +} + impl Rem for DVec2 { type Output = Self; #[inline] @@ -1201,6 +1545,30 @@ impl Rem for DVec2 { } } +impl Rem<&DVec2> for DVec2 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: &DVec2) -> DVec2 { + self.rem(*rhs) + } +} + +impl Rem<&DVec2> for &DVec2 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: &DVec2) -> DVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &DVec2 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: DVec2) -> DVec2 { + (*self).rem(rhs) + } +} + impl RemAssign for DVec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1209,6 +1577,13 @@ impl RemAssign for DVec2 { } } +impl RemAssign<&Self> for DVec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for DVec2 { type Output = Self; #[inline] @@ -1220,6 +1595,30 @@ impl Rem for DVec2 { } } +impl Rem<&f64> for DVec2 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: &f64) -> DVec2 { + self.rem(*rhs) + } +} + +impl Rem<&f64> for &DVec2 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: &f64) -> DVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &DVec2 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: f64) -> DVec2 { + (*self).rem(rhs) + } +} + impl RemAssign for DVec2 { #[inline] fn rem_assign(&mut self, rhs: f64) { @@ -1228,6 +1627,13 @@ impl RemAssign for DVec2 { } } +impl RemAssign<&f64> for DVec2 { + #[inline] + fn rem_assign(&mut self, rhs: &f64) { + self.rem_assign(*rhs) + } +} + impl Rem for f64 { type Output = DVec2; #[inline] @@ -1239,6 +1645,30 @@ impl Rem for f64 { } } +impl Rem<&DVec2> for f64 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: &DVec2) -> DVec2 { + self.rem(*rhs) + } +} + +impl Rem<&DVec2> for &f64 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: &DVec2) -> DVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &f64 { + type Output = DVec2; + #[inline] + fn rem(self, rhs: DVec2) -> DVec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f64; 2]> for DVec2 { #[inline] @@ -1306,6 +1736,14 @@ impl Neg for DVec2 { } } +impl Neg for &DVec2 { + type Output = DVec2; + #[inline] + fn neg(self) -> DVec2 { + (*self).neg() + } +} + impl Index for DVec2 { type Output = f64; #[inline] diff --git a/src/f64/dvec3.rs b/src/f64/dvec3.rs index 85c69bc4..ee8fdf88 100644 --- a/src/f64/dvec3.rs +++ b/src/f64/dvec3.rs @@ -1054,6 +1054,30 @@ impl Div for DVec3 { } } +impl Div<&DVec3> for DVec3 { + type Output = DVec3; + #[inline] + fn div(self, rhs: &DVec3) -> DVec3 { + self.div(*rhs) + } +} + +impl Div<&DVec3> for &DVec3 { + type Output = DVec3; + #[inline] + fn div(self, rhs: &DVec3) -> DVec3 { + (*self).div(*rhs) + } +} + +impl Div for &DVec3 { + type Output = DVec3; + #[inline] + fn div(self, rhs: DVec3) -> DVec3 { + (*self).div(rhs) + } +} + impl DivAssign for DVec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1063,6 +1087,13 @@ impl DivAssign for DVec3 { } } +impl DivAssign<&Self> for DVec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for DVec3 { type Output = Self; #[inline] @@ -1075,6 +1106,30 @@ impl Div for DVec3 { } } +impl Div<&f64> for DVec3 { + type Output = DVec3; + #[inline] + fn div(self, rhs: &f64) -> DVec3 { + self.div(*rhs) + } +} + +impl Div<&f64> for &DVec3 { + type Output = DVec3; + #[inline] + fn div(self, rhs: &f64) -> DVec3 { + (*self).div(*rhs) + } +} + +impl Div for &DVec3 { + type Output = DVec3; + #[inline] + fn div(self, rhs: f64) -> DVec3 { + (*self).div(rhs) + } +} + impl DivAssign for DVec3 { #[inline] fn div_assign(&mut self, rhs: f64) { @@ -1084,6 +1139,13 @@ impl DivAssign for DVec3 { } } +impl DivAssign<&f64> for DVec3 { + #[inline] + fn div_assign(&mut self, rhs: &f64) { + self.div_assign(*rhs) + } +} + impl Div for f64 { type Output = DVec3; #[inline] @@ -1096,6 +1158,30 @@ impl Div for f64 { } } +impl Div<&DVec3> for f64 { + type Output = DVec3; + #[inline] + fn div(self, rhs: &DVec3) -> DVec3 { + self.div(*rhs) + } +} + +impl Div<&DVec3> for &f64 { + type Output = DVec3; + #[inline] + fn div(self, rhs: &DVec3) -> DVec3 { + (*self).div(*rhs) + } +} + +impl Div for &f64 { + type Output = DVec3; + #[inline] + fn div(self, rhs: DVec3) -> DVec3 { + (*self).div(rhs) + } +} + impl Mul for DVec3 { type Output = Self; #[inline] @@ -1108,6 +1194,30 @@ impl Mul for DVec3 { } } +impl Mul<&DVec3> for DVec3 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: &DVec3) -> DVec3 { + self.mul(*rhs) + } +} + +impl Mul<&DVec3> for &DVec3 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: &DVec3) -> DVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &DVec3 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: DVec3) -> DVec3 { + (*self).mul(rhs) + } +} + impl MulAssign for DVec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1117,6 +1227,13 @@ impl MulAssign for DVec3 { } } +impl MulAssign<&Self> for DVec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for DVec3 { type Output = Self; #[inline] @@ -1129,6 +1246,30 @@ impl Mul for DVec3 { } } +impl Mul<&f64> for DVec3 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: &f64) -> DVec3 { + self.mul(*rhs) + } +} + +impl Mul<&f64> for &DVec3 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: &f64) -> DVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &DVec3 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: f64) -> DVec3 { + (*self).mul(rhs) + } +} + impl MulAssign for DVec3 { #[inline] fn mul_assign(&mut self, rhs: f64) { @@ -1138,6 +1279,13 @@ impl MulAssign for DVec3 { } } +impl MulAssign<&f64> for DVec3 { + #[inline] + fn mul_assign(&mut self, rhs: &f64) { + self.mul_assign(*rhs) + } +} + impl Mul for f64 { type Output = DVec3; #[inline] @@ -1150,6 +1298,30 @@ impl Mul for f64 { } } +impl Mul<&DVec3> for f64 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: &DVec3) -> DVec3 { + self.mul(*rhs) + } +} + +impl Mul<&DVec3> for &f64 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: &DVec3) -> DVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &f64 { + type Output = DVec3; + #[inline] + fn mul(self, rhs: DVec3) -> DVec3 { + (*self).mul(rhs) + } +} + impl Add for DVec3 { type Output = Self; #[inline] @@ -1162,6 +1334,30 @@ impl Add for DVec3 { } } +impl Add<&DVec3> for DVec3 { + type Output = DVec3; + #[inline] + fn add(self, rhs: &DVec3) -> DVec3 { + self.add(*rhs) + } +} + +impl Add<&DVec3> for &DVec3 { + type Output = DVec3; + #[inline] + fn add(self, rhs: &DVec3) -> DVec3 { + (*self).add(*rhs) + } +} + +impl Add for &DVec3 { + type Output = DVec3; + #[inline] + fn add(self, rhs: DVec3) -> DVec3 { + (*self).add(rhs) + } +} + impl AddAssign for DVec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1171,6 +1367,13 @@ impl AddAssign for DVec3 { } } +impl AddAssign<&Self> for DVec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for DVec3 { type Output = Self; #[inline] @@ -1183,6 +1386,30 @@ impl Add for DVec3 { } } +impl Add<&f64> for DVec3 { + type Output = DVec3; + #[inline] + fn add(self, rhs: &f64) -> DVec3 { + self.add(*rhs) + } +} + +impl Add<&f64> for &DVec3 { + type Output = DVec3; + #[inline] + fn add(self, rhs: &f64) -> DVec3 { + (*self).add(*rhs) + } +} + +impl Add for &DVec3 { + type Output = DVec3; + #[inline] + fn add(self, rhs: f64) -> DVec3 { + (*self).add(rhs) + } +} + impl AddAssign for DVec3 { #[inline] fn add_assign(&mut self, rhs: f64) { @@ -1192,6 +1419,13 @@ impl AddAssign for DVec3 { } } +impl AddAssign<&f64> for DVec3 { + #[inline] + fn add_assign(&mut self, rhs: &f64) { + self.add_assign(*rhs) + } +} + impl Add for f64 { type Output = DVec3; #[inline] @@ -1204,6 +1438,30 @@ impl Add for f64 { } } +impl Add<&DVec3> for f64 { + type Output = DVec3; + #[inline] + fn add(self, rhs: &DVec3) -> DVec3 { + self.add(*rhs) + } +} + +impl Add<&DVec3> for &f64 { + type Output = DVec3; + #[inline] + fn add(self, rhs: &DVec3) -> DVec3 { + (*self).add(*rhs) + } +} + +impl Add for &f64 { + type Output = DVec3; + #[inline] + fn add(self, rhs: DVec3) -> DVec3 { + (*self).add(rhs) + } +} + impl Sub for DVec3 { type Output = Self; #[inline] @@ -1216,6 +1474,30 @@ impl Sub for DVec3 { } } +impl Sub<&DVec3> for DVec3 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: &DVec3) -> DVec3 { + self.sub(*rhs) + } +} + +impl Sub<&DVec3> for &DVec3 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: &DVec3) -> DVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &DVec3 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: DVec3) -> DVec3 { + (*self).sub(rhs) + } +} + impl SubAssign for DVec3 { #[inline] fn sub_assign(&mut self, rhs: DVec3) { @@ -1225,6 +1507,13 @@ impl SubAssign for DVec3 { } } +impl SubAssign<&Self> for DVec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for DVec3 { type Output = Self; #[inline] @@ -1237,6 +1526,30 @@ impl Sub for DVec3 { } } +impl Sub<&f64> for DVec3 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: &f64) -> DVec3 { + self.sub(*rhs) + } +} + +impl Sub<&f64> for &DVec3 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: &f64) -> DVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &DVec3 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: f64) -> DVec3 { + (*self).sub(rhs) + } +} + impl SubAssign for DVec3 { #[inline] fn sub_assign(&mut self, rhs: f64) { @@ -1246,6 +1559,13 @@ impl SubAssign for DVec3 { } } +impl SubAssign<&f64> for DVec3 { + #[inline] + fn sub_assign(&mut self, rhs: &f64) { + self.sub_assign(*rhs) + } +} + impl Sub for f64 { type Output = DVec3; #[inline] @@ -1258,6 +1578,30 @@ impl Sub for f64 { } } +impl Sub<&DVec3> for f64 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: &DVec3) -> DVec3 { + self.sub(*rhs) + } +} + +impl Sub<&DVec3> for &f64 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: &DVec3) -> DVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &f64 { + type Output = DVec3; + #[inline] + fn sub(self, rhs: DVec3) -> DVec3 { + (*self).sub(rhs) + } +} + impl Rem for DVec3 { type Output = Self; #[inline] @@ -1270,6 +1614,30 @@ impl Rem for DVec3 { } } +impl Rem<&DVec3> for DVec3 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: &DVec3) -> DVec3 { + self.rem(*rhs) + } +} + +impl Rem<&DVec3> for &DVec3 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: &DVec3) -> DVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &DVec3 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: DVec3) -> DVec3 { + (*self).rem(rhs) + } +} + impl RemAssign for DVec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1279,6 +1647,13 @@ impl RemAssign for DVec3 { } } +impl RemAssign<&Self> for DVec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for DVec3 { type Output = Self; #[inline] @@ -1291,6 +1666,30 @@ impl Rem for DVec3 { } } +impl Rem<&f64> for DVec3 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: &f64) -> DVec3 { + self.rem(*rhs) + } +} + +impl Rem<&f64> for &DVec3 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: &f64) -> DVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &DVec3 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: f64) -> DVec3 { + (*self).rem(rhs) + } +} + impl RemAssign for DVec3 { #[inline] fn rem_assign(&mut self, rhs: f64) { @@ -1300,6 +1699,13 @@ impl RemAssign for DVec3 { } } +impl RemAssign<&f64> for DVec3 { + #[inline] + fn rem_assign(&mut self, rhs: &f64) { + self.rem_assign(*rhs) + } +} + impl Rem for f64 { type Output = DVec3; #[inline] @@ -1312,6 +1718,30 @@ impl Rem for f64 { } } +impl Rem<&DVec3> for f64 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: &DVec3) -> DVec3 { + self.rem(*rhs) + } +} + +impl Rem<&DVec3> for &f64 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: &DVec3) -> DVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &f64 { + type Output = DVec3; + #[inline] + fn rem(self, rhs: DVec3) -> DVec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f64; 3]> for DVec3 { #[inline] @@ -1380,6 +1810,14 @@ impl Neg for DVec3 { } } +impl Neg for &DVec3 { + type Output = DVec3; + #[inline] + fn neg(self) -> DVec3 { + (*self).neg() + } +} + impl Index for DVec3 { type Output = f64; #[inline] diff --git a/src/f64/dvec4.rs b/src/f64/dvec4.rs index 3444ba31..0e3b1992 100644 --- a/src/f64/dvec4.rs +++ b/src/f64/dvec4.rs @@ -1039,6 +1039,30 @@ impl Div for DVec4 { } } +impl Div<&DVec4> for DVec4 { + type Output = DVec4; + #[inline] + fn div(self, rhs: &DVec4) -> DVec4 { + self.div(*rhs) + } +} + +impl Div<&DVec4> for &DVec4 { + type Output = DVec4; + #[inline] + fn div(self, rhs: &DVec4) -> DVec4 { + (*self).div(*rhs) + } +} + +impl Div for &DVec4 { + type Output = DVec4; + #[inline] + fn div(self, rhs: DVec4) -> DVec4 { + (*self).div(rhs) + } +} + impl DivAssign for DVec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -1049,6 +1073,13 @@ impl DivAssign for DVec4 { } } +impl DivAssign<&Self> for DVec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for DVec4 { type Output = Self; #[inline] @@ -1062,6 +1093,30 @@ impl Div for DVec4 { } } +impl Div<&f64> for DVec4 { + type Output = DVec4; + #[inline] + fn div(self, rhs: &f64) -> DVec4 { + self.div(*rhs) + } +} + +impl Div<&f64> for &DVec4 { + type Output = DVec4; + #[inline] + fn div(self, rhs: &f64) -> DVec4 { + (*self).div(*rhs) + } +} + +impl Div for &DVec4 { + type Output = DVec4; + #[inline] + fn div(self, rhs: f64) -> DVec4 { + (*self).div(rhs) + } +} + impl DivAssign for DVec4 { #[inline] fn div_assign(&mut self, rhs: f64) { @@ -1072,6 +1127,13 @@ impl DivAssign for DVec4 { } } +impl DivAssign<&f64> for DVec4 { + #[inline] + fn div_assign(&mut self, rhs: &f64) { + self.div_assign(*rhs) + } +} + impl Div for f64 { type Output = DVec4; #[inline] @@ -1085,6 +1147,30 @@ impl Div for f64 { } } +impl Div<&DVec4> for f64 { + type Output = DVec4; + #[inline] + fn div(self, rhs: &DVec4) -> DVec4 { + self.div(*rhs) + } +} + +impl Div<&DVec4> for &f64 { + type Output = DVec4; + #[inline] + fn div(self, rhs: &DVec4) -> DVec4 { + (*self).div(*rhs) + } +} + +impl Div for &f64 { + type Output = DVec4; + #[inline] + fn div(self, rhs: DVec4) -> DVec4 { + (*self).div(rhs) + } +} + impl Mul for DVec4 { type Output = Self; #[inline] @@ -1098,6 +1184,30 @@ impl Mul for DVec4 { } } +impl Mul<&DVec4> for DVec4 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: &DVec4) -> DVec4 { + self.mul(*rhs) + } +} + +impl Mul<&DVec4> for &DVec4 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: &DVec4) -> DVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &DVec4 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: DVec4) -> DVec4 { + (*self).mul(rhs) + } +} + impl MulAssign for DVec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -1108,6 +1218,13 @@ impl MulAssign for DVec4 { } } +impl MulAssign<&Self> for DVec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for DVec4 { type Output = Self; #[inline] @@ -1121,6 +1238,30 @@ impl Mul for DVec4 { } } +impl Mul<&f64> for DVec4 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: &f64) -> DVec4 { + self.mul(*rhs) + } +} + +impl Mul<&f64> for &DVec4 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: &f64) -> DVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &DVec4 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: f64) -> DVec4 { + (*self).mul(rhs) + } +} + impl MulAssign for DVec4 { #[inline] fn mul_assign(&mut self, rhs: f64) { @@ -1131,6 +1272,13 @@ impl MulAssign for DVec4 { } } +impl MulAssign<&f64> for DVec4 { + #[inline] + fn mul_assign(&mut self, rhs: &f64) { + self.mul_assign(*rhs) + } +} + impl Mul for f64 { type Output = DVec4; #[inline] @@ -1144,6 +1292,30 @@ impl Mul for f64 { } } +impl Mul<&DVec4> for f64 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: &DVec4) -> DVec4 { + self.mul(*rhs) + } +} + +impl Mul<&DVec4> for &f64 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: &DVec4) -> DVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &f64 { + type Output = DVec4; + #[inline] + fn mul(self, rhs: DVec4) -> DVec4 { + (*self).mul(rhs) + } +} + impl Add for DVec4 { type Output = Self; #[inline] @@ -1157,6 +1329,30 @@ impl Add for DVec4 { } } +impl Add<&DVec4> for DVec4 { + type Output = DVec4; + #[inline] + fn add(self, rhs: &DVec4) -> DVec4 { + self.add(*rhs) + } +} + +impl Add<&DVec4> for &DVec4 { + type Output = DVec4; + #[inline] + fn add(self, rhs: &DVec4) -> DVec4 { + (*self).add(*rhs) + } +} + +impl Add for &DVec4 { + type Output = DVec4; + #[inline] + fn add(self, rhs: DVec4) -> DVec4 { + (*self).add(rhs) + } +} + impl AddAssign for DVec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -1167,6 +1363,13 @@ impl AddAssign for DVec4 { } } +impl AddAssign<&Self> for DVec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for DVec4 { type Output = Self; #[inline] @@ -1180,6 +1383,30 @@ impl Add for DVec4 { } } +impl Add<&f64> for DVec4 { + type Output = DVec4; + #[inline] + fn add(self, rhs: &f64) -> DVec4 { + self.add(*rhs) + } +} + +impl Add<&f64> for &DVec4 { + type Output = DVec4; + #[inline] + fn add(self, rhs: &f64) -> DVec4 { + (*self).add(*rhs) + } +} + +impl Add for &DVec4 { + type Output = DVec4; + #[inline] + fn add(self, rhs: f64) -> DVec4 { + (*self).add(rhs) + } +} + impl AddAssign for DVec4 { #[inline] fn add_assign(&mut self, rhs: f64) { @@ -1190,6 +1417,13 @@ impl AddAssign for DVec4 { } } +impl AddAssign<&f64> for DVec4 { + #[inline] + fn add_assign(&mut self, rhs: &f64) { + self.add_assign(*rhs) + } +} + impl Add for f64 { type Output = DVec4; #[inline] @@ -1203,6 +1437,30 @@ impl Add for f64 { } } +impl Add<&DVec4> for f64 { + type Output = DVec4; + #[inline] + fn add(self, rhs: &DVec4) -> DVec4 { + self.add(*rhs) + } +} + +impl Add<&DVec4> for &f64 { + type Output = DVec4; + #[inline] + fn add(self, rhs: &DVec4) -> DVec4 { + (*self).add(*rhs) + } +} + +impl Add for &f64 { + type Output = DVec4; + #[inline] + fn add(self, rhs: DVec4) -> DVec4 { + (*self).add(rhs) + } +} + impl Sub for DVec4 { type Output = Self; #[inline] @@ -1216,6 +1474,30 @@ impl Sub for DVec4 { } } +impl Sub<&DVec4> for DVec4 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: &DVec4) -> DVec4 { + self.sub(*rhs) + } +} + +impl Sub<&DVec4> for &DVec4 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: &DVec4) -> DVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &DVec4 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: DVec4) -> DVec4 { + (*self).sub(rhs) + } +} + impl SubAssign for DVec4 { #[inline] fn sub_assign(&mut self, rhs: DVec4) { @@ -1226,6 +1508,13 @@ impl SubAssign for DVec4 { } } +impl SubAssign<&Self> for DVec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for DVec4 { type Output = Self; #[inline] @@ -1239,6 +1528,30 @@ impl Sub for DVec4 { } } +impl Sub<&f64> for DVec4 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: &f64) -> DVec4 { + self.sub(*rhs) + } +} + +impl Sub<&f64> for &DVec4 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: &f64) -> DVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &DVec4 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: f64) -> DVec4 { + (*self).sub(rhs) + } +} + impl SubAssign for DVec4 { #[inline] fn sub_assign(&mut self, rhs: f64) { @@ -1249,6 +1562,13 @@ impl SubAssign for DVec4 { } } +impl SubAssign<&f64> for DVec4 { + #[inline] + fn sub_assign(&mut self, rhs: &f64) { + self.sub_assign(*rhs) + } +} + impl Sub for f64 { type Output = DVec4; #[inline] @@ -1262,6 +1582,30 @@ impl Sub for f64 { } } +impl Sub<&DVec4> for f64 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: &DVec4) -> DVec4 { + self.sub(*rhs) + } +} + +impl Sub<&DVec4> for &f64 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: &DVec4) -> DVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &f64 { + type Output = DVec4; + #[inline] + fn sub(self, rhs: DVec4) -> DVec4 { + (*self).sub(rhs) + } +} + impl Rem for DVec4 { type Output = Self; #[inline] @@ -1275,6 +1619,30 @@ impl Rem for DVec4 { } } +impl Rem<&DVec4> for DVec4 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: &DVec4) -> DVec4 { + self.rem(*rhs) + } +} + +impl Rem<&DVec4> for &DVec4 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: &DVec4) -> DVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &DVec4 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: DVec4) -> DVec4 { + (*self).rem(rhs) + } +} + impl RemAssign for DVec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -1285,6 +1653,13 @@ impl RemAssign for DVec4 { } } +impl RemAssign<&Self> for DVec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for DVec4 { type Output = Self; #[inline] @@ -1298,6 +1673,30 @@ impl Rem for DVec4 { } } +impl Rem<&f64> for DVec4 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: &f64) -> DVec4 { + self.rem(*rhs) + } +} + +impl Rem<&f64> for &DVec4 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: &f64) -> DVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &DVec4 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: f64) -> DVec4 { + (*self).rem(rhs) + } +} + impl RemAssign for DVec4 { #[inline] fn rem_assign(&mut self, rhs: f64) { @@ -1308,6 +1707,13 @@ impl RemAssign for DVec4 { } } +impl RemAssign<&f64> for DVec4 { + #[inline] + fn rem_assign(&mut self, rhs: &f64) { + self.rem_assign(*rhs) + } +} + impl Rem for f64 { type Output = DVec4; #[inline] @@ -1321,6 +1727,30 @@ impl Rem for f64 { } } +impl Rem<&DVec4> for f64 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: &DVec4) -> DVec4 { + self.rem(*rhs) + } +} + +impl Rem<&DVec4> for &f64 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: &DVec4) -> DVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &f64 { + type Output = DVec4; + #[inline] + fn rem(self, rhs: DVec4) -> DVec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[f64; 4]> for DVec4 { #[inline] @@ -1390,6 +1820,14 @@ impl Neg for DVec4 { } } +impl Neg for &DVec4 { + type Output = DVec4; + #[inline] + fn neg(self) -> DVec4 { + (*self).neg() + } +} + impl Index for DVec4 { type Output = f64; #[inline] diff --git a/src/i16/i16vec2.rs b/src/i16/i16vec2.rs index 3dc20b73..a10f8e4e 100644 --- a/src/i16/i16vec2.rs +++ b/src/i16/i16vec2.rs @@ -623,6 +623,30 @@ impl Div for I16Vec2 { } } +impl Div<&I16Vec2> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: &I16Vec2) -> I16Vec2 { + self.div(*rhs) + } +} + +impl Div<&I16Vec2> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: I16Vec2) -> I16Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for I16Vec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -631,6 +655,13 @@ impl DivAssign for I16Vec2 { } } +impl DivAssign<&Self> for I16Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for I16Vec2 { type Output = Self; #[inline] @@ -642,6 +673,30 @@ impl Div for I16Vec2 { } } +impl Div<&i16> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: &i16) -> I16Vec2 { + self.div(*rhs) + } +} + +impl Div<&i16> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: &i16) -> I16Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: i16) -> I16Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for I16Vec2 { #[inline] fn div_assign(&mut self, rhs: i16) { @@ -650,6 +705,13 @@ impl DivAssign for I16Vec2 { } } +impl DivAssign<&i16> for I16Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &i16) { + self.div_assign(*rhs) + } +} + impl Div for i16 { type Output = I16Vec2; #[inline] @@ -661,6 +723,30 @@ impl Div for i16 { } } +impl Div<&I16Vec2> for i16 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: &I16Vec2) -> I16Vec2 { + self.div(*rhs) + } +} + +impl Div<&I16Vec2> for &i16 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &i16 { + type Output = I16Vec2; + #[inline] + fn div(self, rhs: I16Vec2) -> I16Vec2 { + (*self).div(rhs) + } +} + impl Mul for I16Vec2 { type Output = Self; #[inline] @@ -672,6 +758,30 @@ impl Mul for I16Vec2 { } } +impl Mul<&I16Vec2> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: &I16Vec2) -> I16Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&I16Vec2> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: I16Vec2) -> I16Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for I16Vec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -680,6 +790,13 @@ impl MulAssign for I16Vec2 { } } +impl MulAssign<&Self> for I16Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for I16Vec2 { type Output = Self; #[inline] @@ -691,6 +808,30 @@ impl Mul for I16Vec2 { } } +impl Mul<&i16> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: &i16) -> I16Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&i16> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: &i16) -> I16Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: i16) -> I16Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for I16Vec2 { #[inline] fn mul_assign(&mut self, rhs: i16) { @@ -699,6 +840,13 @@ impl MulAssign for I16Vec2 { } } +impl MulAssign<&i16> for I16Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &i16) { + self.mul_assign(*rhs) + } +} + impl Mul for i16 { type Output = I16Vec2; #[inline] @@ -710,6 +858,30 @@ impl Mul for i16 { } } +impl Mul<&I16Vec2> for i16 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: &I16Vec2) -> I16Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&I16Vec2> for &i16 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &i16 { + type Output = I16Vec2; + #[inline] + fn mul(self, rhs: I16Vec2) -> I16Vec2 { + (*self).mul(rhs) + } +} + impl Add for I16Vec2 { type Output = Self; #[inline] @@ -721,6 +893,30 @@ impl Add for I16Vec2 { } } +impl Add<&I16Vec2> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: &I16Vec2) -> I16Vec2 { + self.add(*rhs) + } +} + +impl Add<&I16Vec2> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: I16Vec2) -> I16Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for I16Vec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -729,6 +925,13 @@ impl AddAssign for I16Vec2 { } } +impl AddAssign<&Self> for I16Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for I16Vec2 { type Output = Self; #[inline] @@ -740,6 +943,30 @@ impl Add for I16Vec2 { } } +impl Add<&i16> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: &i16) -> I16Vec2 { + self.add(*rhs) + } +} + +impl Add<&i16> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: &i16) -> I16Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: i16) -> I16Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for I16Vec2 { #[inline] fn add_assign(&mut self, rhs: i16) { @@ -748,6 +975,13 @@ impl AddAssign for I16Vec2 { } } +impl AddAssign<&i16> for I16Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &i16) { + self.add_assign(*rhs) + } +} + impl Add for i16 { type Output = I16Vec2; #[inline] @@ -759,6 +993,30 @@ impl Add for i16 { } } +impl Add<&I16Vec2> for i16 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: &I16Vec2) -> I16Vec2 { + self.add(*rhs) + } +} + +impl Add<&I16Vec2> for &i16 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &i16 { + type Output = I16Vec2; + #[inline] + fn add(self, rhs: I16Vec2) -> I16Vec2 { + (*self).add(rhs) + } +} + impl Sub for I16Vec2 { type Output = Self; #[inline] @@ -770,6 +1028,30 @@ impl Sub for I16Vec2 { } } +impl Sub<&I16Vec2> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: &I16Vec2) -> I16Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&I16Vec2> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: I16Vec2) -> I16Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for I16Vec2 { #[inline] fn sub_assign(&mut self, rhs: I16Vec2) { @@ -778,6 +1060,13 @@ impl SubAssign for I16Vec2 { } } +impl SubAssign<&Self> for I16Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for I16Vec2 { type Output = Self; #[inline] @@ -789,6 +1078,30 @@ impl Sub for I16Vec2 { } } +impl Sub<&i16> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: &i16) -> I16Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&i16> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: &i16) -> I16Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: i16) -> I16Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for I16Vec2 { #[inline] fn sub_assign(&mut self, rhs: i16) { @@ -797,6 +1110,13 @@ impl SubAssign for I16Vec2 { } } +impl SubAssign<&i16> for I16Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &i16) { + self.sub_assign(*rhs) + } +} + impl Sub for i16 { type Output = I16Vec2; #[inline] @@ -808,6 +1128,30 @@ impl Sub for i16 { } } +impl Sub<&I16Vec2> for i16 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: &I16Vec2) -> I16Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&I16Vec2> for &i16 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &i16 { + type Output = I16Vec2; + #[inline] + fn sub(self, rhs: I16Vec2) -> I16Vec2 { + (*self).sub(rhs) + } +} + impl Rem for I16Vec2 { type Output = Self; #[inline] @@ -819,6 +1163,30 @@ impl Rem for I16Vec2 { } } +impl Rem<&I16Vec2> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: &I16Vec2) -> I16Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&I16Vec2> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: I16Vec2) -> I16Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for I16Vec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -827,6 +1195,13 @@ impl RemAssign for I16Vec2 { } } +impl RemAssign<&Self> for I16Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for I16Vec2 { type Output = Self; #[inline] @@ -838,6 +1213,30 @@ impl Rem for I16Vec2 { } } +impl Rem<&i16> for I16Vec2 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: &i16) -> I16Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&i16> for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: &i16) -> I16Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: i16) -> I16Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for I16Vec2 { #[inline] fn rem_assign(&mut self, rhs: i16) { @@ -846,6 +1245,13 @@ impl RemAssign for I16Vec2 { } } +impl RemAssign<&i16> for I16Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &i16) { + self.rem_assign(*rhs) + } +} + impl Rem for i16 { type Output = I16Vec2; #[inline] @@ -857,6 +1263,30 @@ impl Rem for i16 { } } +impl Rem<&I16Vec2> for i16 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: &I16Vec2) -> I16Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&I16Vec2> for &i16 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: &I16Vec2) -> I16Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &i16 { + type Output = I16Vec2; + #[inline] + fn rem(self, rhs: I16Vec2) -> I16Vec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i16; 2]> for I16Vec2 { #[inline] @@ -924,6 +1354,14 @@ impl Neg for I16Vec2 { } } +impl Neg for &I16Vec2 { + type Output = I16Vec2; + #[inline] + fn neg(self) -> I16Vec2 { + (*self).neg() + } +} + impl Not for I16Vec2 { type Output = Self; #[inline] diff --git a/src/i16/i16vec3.rs b/src/i16/i16vec3.rs index 028e1ebb..b87313d0 100644 --- a/src/i16/i16vec3.rs +++ b/src/i16/i16vec3.rs @@ -673,6 +673,30 @@ impl Div for I16Vec3 { } } +impl Div<&I16Vec3> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: &I16Vec3) -> I16Vec3 { + self.div(*rhs) + } +} + +impl Div<&I16Vec3> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: I16Vec3) -> I16Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for I16Vec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -682,6 +706,13 @@ impl DivAssign for I16Vec3 { } } +impl DivAssign<&Self> for I16Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for I16Vec3 { type Output = Self; #[inline] @@ -694,6 +725,30 @@ impl Div for I16Vec3 { } } +impl Div<&i16> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: &i16) -> I16Vec3 { + self.div(*rhs) + } +} + +impl Div<&i16> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: &i16) -> I16Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: i16) -> I16Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for I16Vec3 { #[inline] fn div_assign(&mut self, rhs: i16) { @@ -703,6 +758,13 @@ impl DivAssign for I16Vec3 { } } +impl DivAssign<&i16> for I16Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &i16) { + self.div_assign(*rhs) + } +} + impl Div for i16 { type Output = I16Vec3; #[inline] @@ -715,6 +777,30 @@ impl Div for i16 { } } +impl Div<&I16Vec3> for i16 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: &I16Vec3) -> I16Vec3 { + self.div(*rhs) + } +} + +impl Div<&I16Vec3> for &i16 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &i16 { + type Output = I16Vec3; + #[inline] + fn div(self, rhs: I16Vec3) -> I16Vec3 { + (*self).div(rhs) + } +} + impl Mul for I16Vec3 { type Output = Self; #[inline] @@ -727,6 +813,30 @@ impl Mul for I16Vec3 { } } +impl Mul<&I16Vec3> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: &I16Vec3) -> I16Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&I16Vec3> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: I16Vec3) -> I16Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for I16Vec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -736,6 +846,13 @@ impl MulAssign for I16Vec3 { } } +impl MulAssign<&Self> for I16Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for I16Vec3 { type Output = Self; #[inline] @@ -748,6 +865,30 @@ impl Mul for I16Vec3 { } } +impl Mul<&i16> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: &i16) -> I16Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&i16> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: &i16) -> I16Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: i16) -> I16Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for I16Vec3 { #[inline] fn mul_assign(&mut self, rhs: i16) { @@ -757,6 +898,13 @@ impl MulAssign for I16Vec3 { } } +impl MulAssign<&i16> for I16Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &i16) { + self.mul_assign(*rhs) + } +} + impl Mul for i16 { type Output = I16Vec3; #[inline] @@ -769,6 +917,30 @@ impl Mul for i16 { } } +impl Mul<&I16Vec3> for i16 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: &I16Vec3) -> I16Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&I16Vec3> for &i16 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &i16 { + type Output = I16Vec3; + #[inline] + fn mul(self, rhs: I16Vec3) -> I16Vec3 { + (*self).mul(rhs) + } +} + impl Add for I16Vec3 { type Output = Self; #[inline] @@ -781,6 +953,30 @@ impl Add for I16Vec3 { } } +impl Add<&I16Vec3> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: &I16Vec3) -> I16Vec3 { + self.add(*rhs) + } +} + +impl Add<&I16Vec3> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: I16Vec3) -> I16Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for I16Vec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -790,6 +986,13 @@ impl AddAssign for I16Vec3 { } } +impl AddAssign<&Self> for I16Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for I16Vec3 { type Output = Self; #[inline] @@ -802,6 +1005,30 @@ impl Add for I16Vec3 { } } +impl Add<&i16> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: &i16) -> I16Vec3 { + self.add(*rhs) + } +} + +impl Add<&i16> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: &i16) -> I16Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: i16) -> I16Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for I16Vec3 { #[inline] fn add_assign(&mut self, rhs: i16) { @@ -811,6 +1038,13 @@ impl AddAssign for I16Vec3 { } } +impl AddAssign<&i16> for I16Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &i16) { + self.add_assign(*rhs) + } +} + impl Add for i16 { type Output = I16Vec3; #[inline] @@ -823,6 +1057,30 @@ impl Add for i16 { } } +impl Add<&I16Vec3> for i16 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: &I16Vec3) -> I16Vec3 { + self.add(*rhs) + } +} + +impl Add<&I16Vec3> for &i16 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &i16 { + type Output = I16Vec3; + #[inline] + fn add(self, rhs: I16Vec3) -> I16Vec3 { + (*self).add(rhs) + } +} + impl Sub for I16Vec3 { type Output = Self; #[inline] @@ -835,6 +1093,30 @@ impl Sub for I16Vec3 { } } +impl Sub<&I16Vec3> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: &I16Vec3) -> I16Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&I16Vec3> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: I16Vec3) -> I16Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for I16Vec3 { #[inline] fn sub_assign(&mut self, rhs: I16Vec3) { @@ -844,6 +1126,13 @@ impl SubAssign for I16Vec3 { } } +impl SubAssign<&Self> for I16Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for I16Vec3 { type Output = Self; #[inline] @@ -856,6 +1145,30 @@ impl Sub for I16Vec3 { } } +impl Sub<&i16> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: &i16) -> I16Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&i16> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: &i16) -> I16Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: i16) -> I16Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for I16Vec3 { #[inline] fn sub_assign(&mut self, rhs: i16) { @@ -865,6 +1178,13 @@ impl SubAssign for I16Vec3 { } } +impl SubAssign<&i16> for I16Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &i16) { + self.sub_assign(*rhs) + } +} + impl Sub for i16 { type Output = I16Vec3; #[inline] @@ -877,6 +1197,30 @@ impl Sub for i16 { } } +impl Sub<&I16Vec3> for i16 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: &I16Vec3) -> I16Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&I16Vec3> for &i16 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &i16 { + type Output = I16Vec3; + #[inline] + fn sub(self, rhs: I16Vec3) -> I16Vec3 { + (*self).sub(rhs) + } +} + impl Rem for I16Vec3 { type Output = Self; #[inline] @@ -889,6 +1233,30 @@ impl Rem for I16Vec3 { } } +impl Rem<&I16Vec3> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: &I16Vec3) -> I16Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&I16Vec3> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: I16Vec3) -> I16Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for I16Vec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -898,6 +1266,13 @@ impl RemAssign for I16Vec3 { } } +impl RemAssign<&Self> for I16Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for I16Vec3 { type Output = Self; #[inline] @@ -910,6 +1285,30 @@ impl Rem for I16Vec3 { } } +impl Rem<&i16> for I16Vec3 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: &i16) -> I16Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&i16> for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: &i16) -> I16Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: i16) -> I16Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for I16Vec3 { #[inline] fn rem_assign(&mut self, rhs: i16) { @@ -919,6 +1318,13 @@ impl RemAssign for I16Vec3 { } } +impl RemAssign<&i16> for I16Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &i16) { + self.rem_assign(*rhs) + } +} + impl Rem for i16 { type Output = I16Vec3; #[inline] @@ -931,6 +1337,30 @@ impl Rem for i16 { } } +impl Rem<&I16Vec3> for i16 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: &I16Vec3) -> I16Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&I16Vec3> for &i16 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: &I16Vec3) -> I16Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &i16 { + type Output = I16Vec3; + #[inline] + fn rem(self, rhs: I16Vec3) -> I16Vec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i16; 3]> for I16Vec3 { #[inline] @@ -999,6 +1429,14 @@ impl Neg for I16Vec3 { } } +impl Neg for &I16Vec3 { + type Output = I16Vec3; + #[inline] + fn neg(self) -> I16Vec3 { + (*self).neg() + } +} + impl Not for I16Vec3 { type Output = Self; #[inline] diff --git a/src/i16/i16vec4.rs b/src/i16/i16vec4.rs index 35311093..35289af7 100644 --- a/src/i16/i16vec4.rs +++ b/src/i16/i16vec4.rs @@ -714,6 +714,30 @@ impl Div for I16Vec4 { } } +impl Div<&I16Vec4> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: &I16Vec4) -> I16Vec4 { + self.div(*rhs) + } +} + +impl Div<&I16Vec4> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: I16Vec4) -> I16Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for I16Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -724,6 +748,13 @@ impl DivAssign for I16Vec4 { } } +impl DivAssign<&Self> for I16Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for I16Vec4 { type Output = Self; #[inline] @@ -737,6 +768,30 @@ impl Div for I16Vec4 { } } +impl Div<&i16> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: &i16) -> I16Vec4 { + self.div(*rhs) + } +} + +impl Div<&i16> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: &i16) -> I16Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: i16) -> I16Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for I16Vec4 { #[inline] fn div_assign(&mut self, rhs: i16) { @@ -747,6 +802,13 @@ impl DivAssign for I16Vec4 { } } +impl DivAssign<&i16> for I16Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &i16) { + self.div_assign(*rhs) + } +} + impl Div for i16 { type Output = I16Vec4; #[inline] @@ -760,6 +822,30 @@ impl Div for i16 { } } +impl Div<&I16Vec4> for i16 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: &I16Vec4) -> I16Vec4 { + self.div(*rhs) + } +} + +impl Div<&I16Vec4> for &i16 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &i16 { + type Output = I16Vec4; + #[inline] + fn div(self, rhs: I16Vec4) -> I16Vec4 { + (*self).div(rhs) + } +} + impl Mul for I16Vec4 { type Output = Self; #[inline] @@ -773,6 +859,30 @@ impl Mul for I16Vec4 { } } +impl Mul<&I16Vec4> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: &I16Vec4) -> I16Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&I16Vec4> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: I16Vec4) -> I16Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for I16Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -783,6 +893,13 @@ impl MulAssign for I16Vec4 { } } +impl MulAssign<&Self> for I16Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for I16Vec4 { type Output = Self; #[inline] @@ -796,6 +913,30 @@ impl Mul for I16Vec4 { } } +impl Mul<&i16> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: &i16) -> I16Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&i16> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: &i16) -> I16Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: i16) -> I16Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for I16Vec4 { #[inline] fn mul_assign(&mut self, rhs: i16) { @@ -806,6 +947,13 @@ impl MulAssign for I16Vec4 { } } +impl MulAssign<&i16> for I16Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &i16) { + self.mul_assign(*rhs) + } +} + impl Mul for i16 { type Output = I16Vec4; #[inline] @@ -819,6 +967,30 @@ impl Mul for i16 { } } +impl Mul<&I16Vec4> for i16 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: &I16Vec4) -> I16Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&I16Vec4> for &i16 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &i16 { + type Output = I16Vec4; + #[inline] + fn mul(self, rhs: I16Vec4) -> I16Vec4 { + (*self).mul(rhs) + } +} + impl Add for I16Vec4 { type Output = Self; #[inline] @@ -832,6 +1004,30 @@ impl Add for I16Vec4 { } } +impl Add<&I16Vec4> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: &I16Vec4) -> I16Vec4 { + self.add(*rhs) + } +} + +impl Add<&I16Vec4> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: I16Vec4) -> I16Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for I16Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -842,6 +1038,13 @@ impl AddAssign for I16Vec4 { } } +impl AddAssign<&Self> for I16Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for I16Vec4 { type Output = Self; #[inline] @@ -855,6 +1058,30 @@ impl Add for I16Vec4 { } } +impl Add<&i16> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: &i16) -> I16Vec4 { + self.add(*rhs) + } +} + +impl Add<&i16> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: &i16) -> I16Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: i16) -> I16Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for I16Vec4 { #[inline] fn add_assign(&mut self, rhs: i16) { @@ -865,6 +1092,13 @@ impl AddAssign for I16Vec4 { } } +impl AddAssign<&i16> for I16Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &i16) { + self.add_assign(*rhs) + } +} + impl Add for i16 { type Output = I16Vec4; #[inline] @@ -878,6 +1112,30 @@ impl Add for i16 { } } +impl Add<&I16Vec4> for i16 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: &I16Vec4) -> I16Vec4 { + self.add(*rhs) + } +} + +impl Add<&I16Vec4> for &i16 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &i16 { + type Output = I16Vec4; + #[inline] + fn add(self, rhs: I16Vec4) -> I16Vec4 { + (*self).add(rhs) + } +} + impl Sub for I16Vec4 { type Output = Self; #[inline] @@ -891,6 +1149,30 @@ impl Sub for I16Vec4 { } } +impl Sub<&I16Vec4> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: &I16Vec4) -> I16Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&I16Vec4> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: I16Vec4) -> I16Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for I16Vec4 { #[inline] fn sub_assign(&mut self, rhs: I16Vec4) { @@ -901,6 +1183,13 @@ impl SubAssign for I16Vec4 { } } +impl SubAssign<&Self> for I16Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for I16Vec4 { type Output = Self; #[inline] @@ -914,6 +1203,30 @@ impl Sub for I16Vec4 { } } +impl Sub<&i16> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: &i16) -> I16Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&i16> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: &i16) -> I16Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: i16) -> I16Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for I16Vec4 { #[inline] fn sub_assign(&mut self, rhs: i16) { @@ -924,6 +1237,13 @@ impl SubAssign for I16Vec4 { } } +impl SubAssign<&i16> for I16Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &i16) { + self.sub_assign(*rhs) + } +} + impl Sub for i16 { type Output = I16Vec4; #[inline] @@ -937,6 +1257,30 @@ impl Sub for i16 { } } +impl Sub<&I16Vec4> for i16 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: &I16Vec4) -> I16Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&I16Vec4> for &i16 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &i16 { + type Output = I16Vec4; + #[inline] + fn sub(self, rhs: I16Vec4) -> I16Vec4 { + (*self).sub(rhs) + } +} + impl Rem for I16Vec4 { type Output = Self; #[inline] @@ -950,6 +1294,30 @@ impl Rem for I16Vec4 { } } +impl Rem<&I16Vec4> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: &I16Vec4) -> I16Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&I16Vec4> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: I16Vec4) -> I16Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for I16Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -960,6 +1328,13 @@ impl RemAssign for I16Vec4 { } } +impl RemAssign<&Self> for I16Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for I16Vec4 { type Output = Self; #[inline] @@ -973,6 +1348,30 @@ impl Rem for I16Vec4 { } } +impl Rem<&i16> for I16Vec4 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: &i16) -> I16Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&i16> for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: &i16) -> I16Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: i16) -> I16Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for I16Vec4 { #[inline] fn rem_assign(&mut self, rhs: i16) { @@ -983,6 +1382,13 @@ impl RemAssign for I16Vec4 { } } +impl RemAssign<&i16> for I16Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &i16) { + self.rem_assign(*rhs) + } +} + impl Rem for i16 { type Output = I16Vec4; #[inline] @@ -996,6 +1402,30 @@ impl Rem for i16 { } } +impl Rem<&I16Vec4> for i16 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: &I16Vec4) -> I16Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&I16Vec4> for &i16 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: &I16Vec4) -> I16Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &i16 { + type Output = I16Vec4; + #[inline] + fn rem(self, rhs: I16Vec4) -> I16Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i16; 4]> for I16Vec4 { #[inline] @@ -1065,6 +1495,14 @@ impl Neg for I16Vec4 { } } +impl Neg for &I16Vec4 { + type Output = I16Vec4; + #[inline] + fn neg(self) -> I16Vec4 { + (*self).neg() + } +} + impl Not for I16Vec4 { type Output = Self; #[inline] diff --git a/src/i32/ivec2.rs b/src/i32/ivec2.rs index fbbcae36..8c1fea72 100644 --- a/src/i32/ivec2.rs +++ b/src/i32/ivec2.rs @@ -623,6 +623,30 @@ impl Div for IVec2 { } } +impl Div<&IVec2> for IVec2 { + type Output = IVec2; + #[inline] + fn div(self, rhs: &IVec2) -> IVec2 { + self.div(*rhs) + } +} + +impl Div<&IVec2> for &IVec2 { + type Output = IVec2; + #[inline] + fn div(self, rhs: &IVec2) -> IVec2 { + (*self).div(*rhs) + } +} + +impl Div for &IVec2 { + type Output = IVec2; + #[inline] + fn div(self, rhs: IVec2) -> IVec2 { + (*self).div(rhs) + } +} + impl DivAssign for IVec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -631,6 +655,13 @@ impl DivAssign for IVec2 { } } +impl DivAssign<&Self> for IVec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for IVec2 { type Output = Self; #[inline] @@ -642,6 +673,30 @@ impl Div for IVec2 { } } +impl Div<&i32> for IVec2 { + type Output = IVec2; + #[inline] + fn div(self, rhs: &i32) -> IVec2 { + self.div(*rhs) + } +} + +impl Div<&i32> for &IVec2 { + type Output = IVec2; + #[inline] + fn div(self, rhs: &i32) -> IVec2 { + (*self).div(*rhs) + } +} + +impl Div for &IVec2 { + type Output = IVec2; + #[inline] + fn div(self, rhs: i32) -> IVec2 { + (*self).div(rhs) + } +} + impl DivAssign for IVec2 { #[inline] fn div_assign(&mut self, rhs: i32) { @@ -650,6 +705,13 @@ impl DivAssign for IVec2 { } } +impl DivAssign<&i32> for IVec2 { + #[inline] + fn div_assign(&mut self, rhs: &i32) { + self.div_assign(*rhs) + } +} + impl Div for i32 { type Output = IVec2; #[inline] @@ -661,6 +723,30 @@ impl Div for i32 { } } +impl Div<&IVec2> for i32 { + type Output = IVec2; + #[inline] + fn div(self, rhs: &IVec2) -> IVec2 { + self.div(*rhs) + } +} + +impl Div<&IVec2> for &i32 { + type Output = IVec2; + #[inline] + fn div(self, rhs: &IVec2) -> IVec2 { + (*self).div(*rhs) + } +} + +impl Div for &i32 { + type Output = IVec2; + #[inline] + fn div(self, rhs: IVec2) -> IVec2 { + (*self).div(rhs) + } +} + impl Mul for IVec2 { type Output = Self; #[inline] @@ -672,6 +758,30 @@ impl Mul for IVec2 { } } +impl Mul<&IVec2> for IVec2 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: &IVec2) -> IVec2 { + self.mul(*rhs) + } +} + +impl Mul<&IVec2> for &IVec2 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: &IVec2) -> IVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &IVec2 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: IVec2) -> IVec2 { + (*self).mul(rhs) + } +} + impl MulAssign for IVec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -680,6 +790,13 @@ impl MulAssign for IVec2 { } } +impl MulAssign<&Self> for IVec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for IVec2 { type Output = Self; #[inline] @@ -691,6 +808,30 @@ impl Mul for IVec2 { } } +impl Mul<&i32> for IVec2 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: &i32) -> IVec2 { + self.mul(*rhs) + } +} + +impl Mul<&i32> for &IVec2 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: &i32) -> IVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &IVec2 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: i32) -> IVec2 { + (*self).mul(rhs) + } +} + impl MulAssign for IVec2 { #[inline] fn mul_assign(&mut self, rhs: i32) { @@ -699,6 +840,13 @@ impl MulAssign for IVec2 { } } +impl MulAssign<&i32> for IVec2 { + #[inline] + fn mul_assign(&mut self, rhs: &i32) { + self.mul_assign(*rhs) + } +} + impl Mul for i32 { type Output = IVec2; #[inline] @@ -710,6 +858,30 @@ impl Mul for i32 { } } +impl Mul<&IVec2> for i32 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: &IVec2) -> IVec2 { + self.mul(*rhs) + } +} + +impl Mul<&IVec2> for &i32 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: &IVec2) -> IVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &i32 { + type Output = IVec2; + #[inline] + fn mul(self, rhs: IVec2) -> IVec2 { + (*self).mul(rhs) + } +} + impl Add for IVec2 { type Output = Self; #[inline] @@ -721,6 +893,30 @@ impl Add for IVec2 { } } +impl Add<&IVec2> for IVec2 { + type Output = IVec2; + #[inline] + fn add(self, rhs: &IVec2) -> IVec2 { + self.add(*rhs) + } +} + +impl Add<&IVec2> for &IVec2 { + type Output = IVec2; + #[inline] + fn add(self, rhs: &IVec2) -> IVec2 { + (*self).add(*rhs) + } +} + +impl Add for &IVec2 { + type Output = IVec2; + #[inline] + fn add(self, rhs: IVec2) -> IVec2 { + (*self).add(rhs) + } +} + impl AddAssign for IVec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -729,6 +925,13 @@ impl AddAssign for IVec2 { } } +impl AddAssign<&Self> for IVec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for IVec2 { type Output = Self; #[inline] @@ -740,6 +943,30 @@ impl Add for IVec2 { } } +impl Add<&i32> for IVec2 { + type Output = IVec2; + #[inline] + fn add(self, rhs: &i32) -> IVec2 { + self.add(*rhs) + } +} + +impl Add<&i32> for &IVec2 { + type Output = IVec2; + #[inline] + fn add(self, rhs: &i32) -> IVec2 { + (*self).add(*rhs) + } +} + +impl Add for &IVec2 { + type Output = IVec2; + #[inline] + fn add(self, rhs: i32) -> IVec2 { + (*self).add(rhs) + } +} + impl AddAssign for IVec2 { #[inline] fn add_assign(&mut self, rhs: i32) { @@ -748,6 +975,13 @@ impl AddAssign for IVec2 { } } +impl AddAssign<&i32> for IVec2 { + #[inline] + fn add_assign(&mut self, rhs: &i32) { + self.add_assign(*rhs) + } +} + impl Add for i32 { type Output = IVec2; #[inline] @@ -759,6 +993,30 @@ impl Add for i32 { } } +impl Add<&IVec2> for i32 { + type Output = IVec2; + #[inline] + fn add(self, rhs: &IVec2) -> IVec2 { + self.add(*rhs) + } +} + +impl Add<&IVec2> for &i32 { + type Output = IVec2; + #[inline] + fn add(self, rhs: &IVec2) -> IVec2 { + (*self).add(*rhs) + } +} + +impl Add for &i32 { + type Output = IVec2; + #[inline] + fn add(self, rhs: IVec2) -> IVec2 { + (*self).add(rhs) + } +} + impl Sub for IVec2 { type Output = Self; #[inline] @@ -770,6 +1028,30 @@ impl Sub for IVec2 { } } +impl Sub<&IVec2> for IVec2 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: &IVec2) -> IVec2 { + self.sub(*rhs) + } +} + +impl Sub<&IVec2> for &IVec2 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: &IVec2) -> IVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &IVec2 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: IVec2) -> IVec2 { + (*self).sub(rhs) + } +} + impl SubAssign for IVec2 { #[inline] fn sub_assign(&mut self, rhs: IVec2) { @@ -778,6 +1060,13 @@ impl SubAssign for IVec2 { } } +impl SubAssign<&Self> for IVec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for IVec2 { type Output = Self; #[inline] @@ -789,6 +1078,30 @@ impl Sub for IVec2 { } } +impl Sub<&i32> for IVec2 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: &i32) -> IVec2 { + self.sub(*rhs) + } +} + +impl Sub<&i32> for &IVec2 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: &i32) -> IVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &IVec2 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: i32) -> IVec2 { + (*self).sub(rhs) + } +} + impl SubAssign for IVec2 { #[inline] fn sub_assign(&mut self, rhs: i32) { @@ -797,6 +1110,13 @@ impl SubAssign for IVec2 { } } +impl SubAssign<&i32> for IVec2 { + #[inline] + fn sub_assign(&mut self, rhs: &i32) { + self.sub_assign(*rhs) + } +} + impl Sub for i32 { type Output = IVec2; #[inline] @@ -808,6 +1128,30 @@ impl Sub for i32 { } } +impl Sub<&IVec2> for i32 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: &IVec2) -> IVec2 { + self.sub(*rhs) + } +} + +impl Sub<&IVec2> for &i32 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: &IVec2) -> IVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &i32 { + type Output = IVec2; + #[inline] + fn sub(self, rhs: IVec2) -> IVec2 { + (*self).sub(rhs) + } +} + impl Rem for IVec2 { type Output = Self; #[inline] @@ -819,6 +1163,30 @@ impl Rem for IVec2 { } } +impl Rem<&IVec2> for IVec2 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: &IVec2) -> IVec2 { + self.rem(*rhs) + } +} + +impl Rem<&IVec2> for &IVec2 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: &IVec2) -> IVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &IVec2 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: IVec2) -> IVec2 { + (*self).rem(rhs) + } +} + impl RemAssign for IVec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -827,6 +1195,13 @@ impl RemAssign for IVec2 { } } +impl RemAssign<&Self> for IVec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for IVec2 { type Output = Self; #[inline] @@ -838,6 +1213,30 @@ impl Rem for IVec2 { } } +impl Rem<&i32> for IVec2 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: &i32) -> IVec2 { + self.rem(*rhs) + } +} + +impl Rem<&i32> for &IVec2 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: &i32) -> IVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &IVec2 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: i32) -> IVec2 { + (*self).rem(rhs) + } +} + impl RemAssign for IVec2 { #[inline] fn rem_assign(&mut self, rhs: i32) { @@ -846,6 +1245,13 @@ impl RemAssign for IVec2 { } } +impl RemAssign<&i32> for IVec2 { + #[inline] + fn rem_assign(&mut self, rhs: &i32) { + self.rem_assign(*rhs) + } +} + impl Rem for i32 { type Output = IVec2; #[inline] @@ -857,6 +1263,30 @@ impl Rem for i32 { } } +impl Rem<&IVec2> for i32 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: &IVec2) -> IVec2 { + self.rem(*rhs) + } +} + +impl Rem<&IVec2> for &i32 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: &IVec2) -> IVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &i32 { + type Output = IVec2; + #[inline] + fn rem(self, rhs: IVec2) -> IVec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i32; 2]> for IVec2 { #[inline] @@ -924,6 +1354,14 @@ impl Neg for IVec2 { } } +impl Neg for &IVec2 { + type Output = IVec2; + #[inline] + fn neg(self) -> IVec2 { + (*self).neg() + } +} + impl Not for IVec2 { type Output = Self; #[inline] diff --git a/src/i32/ivec3.rs b/src/i32/ivec3.rs index a361b32f..eb015eca 100644 --- a/src/i32/ivec3.rs +++ b/src/i32/ivec3.rs @@ -673,6 +673,30 @@ impl Div for IVec3 { } } +impl Div<&IVec3> for IVec3 { + type Output = IVec3; + #[inline] + fn div(self, rhs: &IVec3) -> IVec3 { + self.div(*rhs) + } +} + +impl Div<&IVec3> for &IVec3 { + type Output = IVec3; + #[inline] + fn div(self, rhs: &IVec3) -> IVec3 { + (*self).div(*rhs) + } +} + +impl Div for &IVec3 { + type Output = IVec3; + #[inline] + fn div(self, rhs: IVec3) -> IVec3 { + (*self).div(rhs) + } +} + impl DivAssign for IVec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -682,6 +706,13 @@ impl DivAssign for IVec3 { } } +impl DivAssign<&Self> for IVec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for IVec3 { type Output = Self; #[inline] @@ -694,6 +725,30 @@ impl Div for IVec3 { } } +impl Div<&i32> for IVec3 { + type Output = IVec3; + #[inline] + fn div(self, rhs: &i32) -> IVec3 { + self.div(*rhs) + } +} + +impl Div<&i32> for &IVec3 { + type Output = IVec3; + #[inline] + fn div(self, rhs: &i32) -> IVec3 { + (*self).div(*rhs) + } +} + +impl Div for &IVec3 { + type Output = IVec3; + #[inline] + fn div(self, rhs: i32) -> IVec3 { + (*self).div(rhs) + } +} + impl DivAssign for IVec3 { #[inline] fn div_assign(&mut self, rhs: i32) { @@ -703,6 +758,13 @@ impl DivAssign for IVec3 { } } +impl DivAssign<&i32> for IVec3 { + #[inline] + fn div_assign(&mut self, rhs: &i32) { + self.div_assign(*rhs) + } +} + impl Div for i32 { type Output = IVec3; #[inline] @@ -715,6 +777,30 @@ impl Div for i32 { } } +impl Div<&IVec3> for i32 { + type Output = IVec3; + #[inline] + fn div(self, rhs: &IVec3) -> IVec3 { + self.div(*rhs) + } +} + +impl Div<&IVec3> for &i32 { + type Output = IVec3; + #[inline] + fn div(self, rhs: &IVec3) -> IVec3 { + (*self).div(*rhs) + } +} + +impl Div for &i32 { + type Output = IVec3; + #[inline] + fn div(self, rhs: IVec3) -> IVec3 { + (*self).div(rhs) + } +} + impl Mul for IVec3 { type Output = Self; #[inline] @@ -727,6 +813,30 @@ impl Mul for IVec3 { } } +impl Mul<&IVec3> for IVec3 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: &IVec3) -> IVec3 { + self.mul(*rhs) + } +} + +impl Mul<&IVec3> for &IVec3 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: &IVec3) -> IVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &IVec3 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: IVec3) -> IVec3 { + (*self).mul(rhs) + } +} + impl MulAssign for IVec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -736,6 +846,13 @@ impl MulAssign for IVec3 { } } +impl MulAssign<&Self> for IVec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for IVec3 { type Output = Self; #[inline] @@ -748,6 +865,30 @@ impl Mul for IVec3 { } } +impl Mul<&i32> for IVec3 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: &i32) -> IVec3 { + self.mul(*rhs) + } +} + +impl Mul<&i32> for &IVec3 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: &i32) -> IVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &IVec3 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: i32) -> IVec3 { + (*self).mul(rhs) + } +} + impl MulAssign for IVec3 { #[inline] fn mul_assign(&mut self, rhs: i32) { @@ -757,6 +898,13 @@ impl MulAssign for IVec3 { } } +impl MulAssign<&i32> for IVec3 { + #[inline] + fn mul_assign(&mut self, rhs: &i32) { + self.mul_assign(*rhs) + } +} + impl Mul for i32 { type Output = IVec3; #[inline] @@ -769,6 +917,30 @@ impl Mul for i32 { } } +impl Mul<&IVec3> for i32 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: &IVec3) -> IVec3 { + self.mul(*rhs) + } +} + +impl Mul<&IVec3> for &i32 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: &IVec3) -> IVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &i32 { + type Output = IVec3; + #[inline] + fn mul(self, rhs: IVec3) -> IVec3 { + (*self).mul(rhs) + } +} + impl Add for IVec3 { type Output = Self; #[inline] @@ -781,6 +953,30 @@ impl Add for IVec3 { } } +impl Add<&IVec3> for IVec3 { + type Output = IVec3; + #[inline] + fn add(self, rhs: &IVec3) -> IVec3 { + self.add(*rhs) + } +} + +impl Add<&IVec3> for &IVec3 { + type Output = IVec3; + #[inline] + fn add(self, rhs: &IVec3) -> IVec3 { + (*self).add(*rhs) + } +} + +impl Add for &IVec3 { + type Output = IVec3; + #[inline] + fn add(self, rhs: IVec3) -> IVec3 { + (*self).add(rhs) + } +} + impl AddAssign for IVec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -790,6 +986,13 @@ impl AddAssign for IVec3 { } } +impl AddAssign<&Self> for IVec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for IVec3 { type Output = Self; #[inline] @@ -802,6 +1005,30 @@ impl Add for IVec3 { } } +impl Add<&i32> for IVec3 { + type Output = IVec3; + #[inline] + fn add(self, rhs: &i32) -> IVec3 { + self.add(*rhs) + } +} + +impl Add<&i32> for &IVec3 { + type Output = IVec3; + #[inline] + fn add(self, rhs: &i32) -> IVec3 { + (*self).add(*rhs) + } +} + +impl Add for &IVec3 { + type Output = IVec3; + #[inline] + fn add(self, rhs: i32) -> IVec3 { + (*self).add(rhs) + } +} + impl AddAssign for IVec3 { #[inline] fn add_assign(&mut self, rhs: i32) { @@ -811,6 +1038,13 @@ impl AddAssign for IVec3 { } } +impl AddAssign<&i32> for IVec3 { + #[inline] + fn add_assign(&mut self, rhs: &i32) { + self.add_assign(*rhs) + } +} + impl Add for i32 { type Output = IVec3; #[inline] @@ -823,6 +1057,30 @@ impl Add for i32 { } } +impl Add<&IVec3> for i32 { + type Output = IVec3; + #[inline] + fn add(self, rhs: &IVec3) -> IVec3 { + self.add(*rhs) + } +} + +impl Add<&IVec3> for &i32 { + type Output = IVec3; + #[inline] + fn add(self, rhs: &IVec3) -> IVec3 { + (*self).add(*rhs) + } +} + +impl Add for &i32 { + type Output = IVec3; + #[inline] + fn add(self, rhs: IVec3) -> IVec3 { + (*self).add(rhs) + } +} + impl Sub for IVec3 { type Output = Self; #[inline] @@ -835,6 +1093,30 @@ impl Sub for IVec3 { } } +impl Sub<&IVec3> for IVec3 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: &IVec3) -> IVec3 { + self.sub(*rhs) + } +} + +impl Sub<&IVec3> for &IVec3 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: &IVec3) -> IVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &IVec3 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: IVec3) -> IVec3 { + (*self).sub(rhs) + } +} + impl SubAssign for IVec3 { #[inline] fn sub_assign(&mut self, rhs: IVec3) { @@ -844,6 +1126,13 @@ impl SubAssign for IVec3 { } } +impl SubAssign<&Self> for IVec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for IVec3 { type Output = Self; #[inline] @@ -856,6 +1145,30 @@ impl Sub for IVec3 { } } +impl Sub<&i32> for IVec3 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: &i32) -> IVec3 { + self.sub(*rhs) + } +} + +impl Sub<&i32> for &IVec3 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: &i32) -> IVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &IVec3 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: i32) -> IVec3 { + (*self).sub(rhs) + } +} + impl SubAssign for IVec3 { #[inline] fn sub_assign(&mut self, rhs: i32) { @@ -865,6 +1178,13 @@ impl SubAssign for IVec3 { } } +impl SubAssign<&i32> for IVec3 { + #[inline] + fn sub_assign(&mut self, rhs: &i32) { + self.sub_assign(*rhs) + } +} + impl Sub for i32 { type Output = IVec3; #[inline] @@ -877,6 +1197,30 @@ impl Sub for i32 { } } +impl Sub<&IVec3> for i32 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: &IVec3) -> IVec3 { + self.sub(*rhs) + } +} + +impl Sub<&IVec3> for &i32 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: &IVec3) -> IVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &i32 { + type Output = IVec3; + #[inline] + fn sub(self, rhs: IVec3) -> IVec3 { + (*self).sub(rhs) + } +} + impl Rem for IVec3 { type Output = Self; #[inline] @@ -889,6 +1233,30 @@ impl Rem for IVec3 { } } +impl Rem<&IVec3> for IVec3 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: &IVec3) -> IVec3 { + self.rem(*rhs) + } +} + +impl Rem<&IVec3> for &IVec3 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: &IVec3) -> IVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &IVec3 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: IVec3) -> IVec3 { + (*self).rem(rhs) + } +} + impl RemAssign for IVec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -898,6 +1266,13 @@ impl RemAssign for IVec3 { } } +impl RemAssign<&Self> for IVec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for IVec3 { type Output = Self; #[inline] @@ -910,6 +1285,30 @@ impl Rem for IVec3 { } } +impl Rem<&i32> for IVec3 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: &i32) -> IVec3 { + self.rem(*rhs) + } +} + +impl Rem<&i32> for &IVec3 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: &i32) -> IVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &IVec3 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: i32) -> IVec3 { + (*self).rem(rhs) + } +} + impl RemAssign for IVec3 { #[inline] fn rem_assign(&mut self, rhs: i32) { @@ -919,6 +1318,13 @@ impl RemAssign for IVec3 { } } +impl RemAssign<&i32> for IVec3 { + #[inline] + fn rem_assign(&mut self, rhs: &i32) { + self.rem_assign(*rhs) + } +} + impl Rem for i32 { type Output = IVec3; #[inline] @@ -931,6 +1337,30 @@ impl Rem for i32 { } } +impl Rem<&IVec3> for i32 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: &IVec3) -> IVec3 { + self.rem(*rhs) + } +} + +impl Rem<&IVec3> for &i32 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: &IVec3) -> IVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &i32 { + type Output = IVec3; + #[inline] + fn rem(self, rhs: IVec3) -> IVec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i32; 3]> for IVec3 { #[inline] @@ -999,6 +1429,14 @@ impl Neg for IVec3 { } } +impl Neg for &IVec3 { + type Output = IVec3; + #[inline] + fn neg(self) -> IVec3 { + (*self).neg() + } +} + impl Not for IVec3 { type Output = Self; #[inline] diff --git a/src/i32/ivec4.rs b/src/i32/ivec4.rs index 78c3047c..3f04d3c1 100644 --- a/src/i32/ivec4.rs +++ b/src/i32/ivec4.rs @@ -714,6 +714,30 @@ impl Div for IVec4 { } } +impl Div<&IVec4> for IVec4 { + type Output = IVec4; + #[inline] + fn div(self, rhs: &IVec4) -> IVec4 { + self.div(*rhs) + } +} + +impl Div<&IVec4> for &IVec4 { + type Output = IVec4; + #[inline] + fn div(self, rhs: &IVec4) -> IVec4 { + (*self).div(*rhs) + } +} + +impl Div for &IVec4 { + type Output = IVec4; + #[inline] + fn div(self, rhs: IVec4) -> IVec4 { + (*self).div(rhs) + } +} + impl DivAssign for IVec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -724,6 +748,13 @@ impl DivAssign for IVec4 { } } +impl DivAssign<&Self> for IVec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for IVec4 { type Output = Self; #[inline] @@ -737,6 +768,30 @@ impl Div for IVec4 { } } +impl Div<&i32> for IVec4 { + type Output = IVec4; + #[inline] + fn div(self, rhs: &i32) -> IVec4 { + self.div(*rhs) + } +} + +impl Div<&i32> for &IVec4 { + type Output = IVec4; + #[inline] + fn div(self, rhs: &i32) -> IVec4 { + (*self).div(*rhs) + } +} + +impl Div for &IVec4 { + type Output = IVec4; + #[inline] + fn div(self, rhs: i32) -> IVec4 { + (*self).div(rhs) + } +} + impl DivAssign for IVec4 { #[inline] fn div_assign(&mut self, rhs: i32) { @@ -747,6 +802,13 @@ impl DivAssign for IVec4 { } } +impl DivAssign<&i32> for IVec4 { + #[inline] + fn div_assign(&mut self, rhs: &i32) { + self.div_assign(*rhs) + } +} + impl Div for i32 { type Output = IVec4; #[inline] @@ -760,6 +822,30 @@ impl Div for i32 { } } +impl Div<&IVec4> for i32 { + type Output = IVec4; + #[inline] + fn div(self, rhs: &IVec4) -> IVec4 { + self.div(*rhs) + } +} + +impl Div<&IVec4> for &i32 { + type Output = IVec4; + #[inline] + fn div(self, rhs: &IVec4) -> IVec4 { + (*self).div(*rhs) + } +} + +impl Div for &i32 { + type Output = IVec4; + #[inline] + fn div(self, rhs: IVec4) -> IVec4 { + (*self).div(rhs) + } +} + impl Mul for IVec4 { type Output = Self; #[inline] @@ -773,6 +859,30 @@ impl Mul for IVec4 { } } +impl Mul<&IVec4> for IVec4 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: &IVec4) -> IVec4 { + self.mul(*rhs) + } +} + +impl Mul<&IVec4> for &IVec4 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: &IVec4) -> IVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &IVec4 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: IVec4) -> IVec4 { + (*self).mul(rhs) + } +} + impl MulAssign for IVec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -783,6 +893,13 @@ impl MulAssign for IVec4 { } } +impl MulAssign<&Self> for IVec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for IVec4 { type Output = Self; #[inline] @@ -796,6 +913,30 @@ impl Mul for IVec4 { } } +impl Mul<&i32> for IVec4 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: &i32) -> IVec4 { + self.mul(*rhs) + } +} + +impl Mul<&i32> for &IVec4 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: &i32) -> IVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &IVec4 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: i32) -> IVec4 { + (*self).mul(rhs) + } +} + impl MulAssign for IVec4 { #[inline] fn mul_assign(&mut self, rhs: i32) { @@ -806,6 +947,13 @@ impl MulAssign for IVec4 { } } +impl MulAssign<&i32> for IVec4 { + #[inline] + fn mul_assign(&mut self, rhs: &i32) { + self.mul_assign(*rhs) + } +} + impl Mul for i32 { type Output = IVec4; #[inline] @@ -819,6 +967,30 @@ impl Mul for i32 { } } +impl Mul<&IVec4> for i32 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: &IVec4) -> IVec4 { + self.mul(*rhs) + } +} + +impl Mul<&IVec4> for &i32 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: &IVec4) -> IVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &i32 { + type Output = IVec4; + #[inline] + fn mul(self, rhs: IVec4) -> IVec4 { + (*self).mul(rhs) + } +} + impl Add for IVec4 { type Output = Self; #[inline] @@ -832,6 +1004,30 @@ impl Add for IVec4 { } } +impl Add<&IVec4> for IVec4 { + type Output = IVec4; + #[inline] + fn add(self, rhs: &IVec4) -> IVec4 { + self.add(*rhs) + } +} + +impl Add<&IVec4> for &IVec4 { + type Output = IVec4; + #[inline] + fn add(self, rhs: &IVec4) -> IVec4 { + (*self).add(*rhs) + } +} + +impl Add for &IVec4 { + type Output = IVec4; + #[inline] + fn add(self, rhs: IVec4) -> IVec4 { + (*self).add(rhs) + } +} + impl AddAssign for IVec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -842,6 +1038,13 @@ impl AddAssign for IVec4 { } } +impl AddAssign<&Self> for IVec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for IVec4 { type Output = Self; #[inline] @@ -855,6 +1058,30 @@ impl Add for IVec4 { } } +impl Add<&i32> for IVec4 { + type Output = IVec4; + #[inline] + fn add(self, rhs: &i32) -> IVec4 { + self.add(*rhs) + } +} + +impl Add<&i32> for &IVec4 { + type Output = IVec4; + #[inline] + fn add(self, rhs: &i32) -> IVec4 { + (*self).add(*rhs) + } +} + +impl Add for &IVec4 { + type Output = IVec4; + #[inline] + fn add(self, rhs: i32) -> IVec4 { + (*self).add(rhs) + } +} + impl AddAssign for IVec4 { #[inline] fn add_assign(&mut self, rhs: i32) { @@ -865,6 +1092,13 @@ impl AddAssign for IVec4 { } } +impl AddAssign<&i32> for IVec4 { + #[inline] + fn add_assign(&mut self, rhs: &i32) { + self.add_assign(*rhs) + } +} + impl Add for i32 { type Output = IVec4; #[inline] @@ -878,6 +1112,30 @@ impl Add for i32 { } } +impl Add<&IVec4> for i32 { + type Output = IVec4; + #[inline] + fn add(self, rhs: &IVec4) -> IVec4 { + self.add(*rhs) + } +} + +impl Add<&IVec4> for &i32 { + type Output = IVec4; + #[inline] + fn add(self, rhs: &IVec4) -> IVec4 { + (*self).add(*rhs) + } +} + +impl Add for &i32 { + type Output = IVec4; + #[inline] + fn add(self, rhs: IVec4) -> IVec4 { + (*self).add(rhs) + } +} + impl Sub for IVec4 { type Output = Self; #[inline] @@ -891,6 +1149,30 @@ impl Sub for IVec4 { } } +impl Sub<&IVec4> for IVec4 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: &IVec4) -> IVec4 { + self.sub(*rhs) + } +} + +impl Sub<&IVec4> for &IVec4 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: &IVec4) -> IVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &IVec4 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: IVec4) -> IVec4 { + (*self).sub(rhs) + } +} + impl SubAssign for IVec4 { #[inline] fn sub_assign(&mut self, rhs: IVec4) { @@ -901,6 +1183,13 @@ impl SubAssign for IVec4 { } } +impl SubAssign<&Self> for IVec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for IVec4 { type Output = Self; #[inline] @@ -914,6 +1203,30 @@ impl Sub for IVec4 { } } +impl Sub<&i32> for IVec4 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: &i32) -> IVec4 { + self.sub(*rhs) + } +} + +impl Sub<&i32> for &IVec4 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: &i32) -> IVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &IVec4 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: i32) -> IVec4 { + (*self).sub(rhs) + } +} + impl SubAssign for IVec4 { #[inline] fn sub_assign(&mut self, rhs: i32) { @@ -924,6 +1237,13 @@ impl SubAssign for IVec4 { } } +impl SubAssign<&i32> for IVec4 { + #[inline] + fn sub_assign(&mut self, rhs: &i32) { + self.sub_assign(*rhs) + } +} + impl Sub for i32 { type Output = IVec4; #[inline] @@ -937,6 +1257,30 @@ impl Sub for i32 { } } +impl Sub<&IVec4> for i32 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: &IVec4) -> IVec4 { + self.sub(*rhs) + } +} + +impl Sub<&IVec4> for &i32 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: &IVec4) -> IVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &i32 { + type Output = IVec4; + #[inline] + fn sub(self, rhs: IVec4) -> IVec4 { + (*self).sub(rhs) + } +} + impl Rem for IVec4 { type Output = Self; #[inline] @@ -950,6 +1294,30 @@ impl Rem for IVec4 { } } +impl Rem<&IVec4> for IVec4 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: &IVec4) -> IVec4 { + self.rem(*rhs) + } +} + +impl Rem<&IVec4> for &IVec4 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: &IVec4) -> IVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &IVec4 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: IVec4) -> IVec4 { + (*self).rem(rhs) + } +} + impl RemAssign for IVec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -960,6 +1328,13 @@ impl RemAssign for IVec4 { } } +impl RemAssign<&Self> for IVec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for IVec4 { type Output = Self; #[inline] @@ -973,6 +1348,30 @@ impl Rem for IVec4 { } } +impl Rem<&i32> for IVec4 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: &i32) -> IVec4 { + self.rem(*rhs) + } +} + +impl Rem<&i32> for &IVec4 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: &i32) -> IVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &IVec4 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: i32) -> IVec4 { + (*self).rem(rhs) + } +} + impl RemAssign for IVec4 { #[inline] fn rem_assign(&mut self, rhs: i32) { @@ -983,6 +1382,13 @@ impl RemAssign for IVec4 { } } +impl RemAssign<&i32> for IVec4 { + #[inline] + fn rem_assign(&mut self, rhs: &i32) { + self.rem_assign(*rhs) + } +} + impl Rem for i32 { type Output = IVec4; #[inline] @@ -996,6 +1402,30 @@ impl Rem for i32 { } } +impl Rem<&IVec4> for i32 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: &IVec4) -> IVec4 { + self.rem(*rhs) + } +} + +impl Rem<&IVec4> for &i32 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: &IVec4) -> IVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &i32 { + type Output = IVec4; + #[inline] + fn rem(self, rhs: IVec4) -> IVec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i32; 4]> for IVec4 { #[inline] @@ -1065,6 +1495,14 @@ impl Neg for IVec4 { } } +impl Neg for &IVec4 { + type Output = IVec4; + #[inline] + fn neg(self) -> IVec4 { + (*self).neg() + } +} + impl Not for IVec4 { type Output = Self; #[inline] diff --git a/src/i64/i64vec2.rs b/src/i64/i64vec2.rs index 7bffc217..4d3d1222 100644 --- a/src/i64/i64vec2.rs +++ b/src/i64/i64vec2.rs @@ -623,6 +623,30 @@ impl Div for I64Vec2 { } } +impl Div<&I64Vec2> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: &I64Vec2) -> I64Vec2 { + self.div(*rhs) + } +} + +impl Div<&I64Vec2> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: I64Vec2) -> I64Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for I64Vec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -631,6 +655,13 @@ impl DivAssign for I64Vec2 { } } +impl DivAssign<&Self> for I64Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for I64Vec2 { type Output = Self; #[inline] @@ -642,6 +673,30 @@ impl Div for I64Vec2 { } } +impl Div<&i64> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: &i64) -> I64Vec2 { + self.div(*rhs) + } +} + +impl Div<&i64> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: &i64) -> I64Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: i64) -> I64Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for I64Vec2 { #[inline] fn div_assign(&mut self, rhs: i64) { @@ -650,6 +705,13 @@ impl DivAssign for I64Vec2 { } } +impl DivAssign<&i64> for I64Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &i64) { + self.div_assign(*rhs) + } +} + impl Div for i64 { type Output = I64Vec2; #[inline] @@ -661,6 +723,30 @@ impl Div for i64 { } } +impl Div<&I64Vec2> for i64 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: &I64Vec2) -> I64Vec2 { + self.div(*rhs) + } +} + +impl Div<&I64Vec2> for &i64 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &i64 { + type Output = I64Vec2; + #[inline] + fn div(self, rhs: I64Vec2) -> I64Vec2 { + (*self).div(rhs) + } +} + impl Mul for I64Vec2 { type Output = Self; #[inline] @@ -672,6 +758,30 @@ impl Mul for I64Vec2 { } } +impl Mul<&I64Vec2> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: &I64Vec2) -> I64Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&I64Vec2> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: I64Vec2) -> I64Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for I64Vec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -680,6 +790,13 @@ impl MulAssign for I64Vec2 { } } +impl MulAssign<&Self> for I64Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for I64Vec2 { type Output = Self; #[inline] @@ -691,6 +808,30 @@ impl Mul for I64Vec2 { } } +impl Mul<&i64> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: &i64) -> I64Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&i64> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: &i64) -> I64Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: i64) -> I64Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for I64Vec2 { #[inline] fn mul_assign(&mut self, rhs: i64) { @@ -699,6 +840,13 @@ impl MulAssign for I64Vec2 { } } +impl MulAssign<&i64> for I64Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &i64) { + self.mul_assign(*rhs) + } +} + impl Mul for i64 { type Output = I64Vec2; #[inline] @@ -710,6 +858,30 @@ impl Mul for i64 { } } +impl Mul<&I64Vec2> for i64 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: &I64Vec2) -> I64Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&I64Vec2> for &i64 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &i64 { + type Output = I64Vec2; + #[inline] + fn mul(self, rhs: I64Vec2) -> I64Vec2 { + (*self).mul(rhs) + } +} + impl Add for I64Vec2 { type Output = Self; #[inline] @@ -721,6 +893,30 @@ impl Add for I64Vec2 { } } +impl Add<&I64Vec2> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: &I64Vec2) -> I64Vec2 { + self.add(*rhs) + } +} + +impl Add<&I64Vec2> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: I64Vec2) -> I64Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for I64Vec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -729,6 +925,13 @@ impl AddAssign for I64Vec2 { } } +impl AddAssign<&Self> for I64Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for I64Vec2 { type Output = Self; #[inline] @@ -740,6 +943,30 @@ impl Add for I64Vec2 { } } +impl Add<&i64> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: &i64) -> I64Vec2 { + self.add(*rhs) + } +} + +impl Add<&i64> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: &i64) -> I64Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: i64) -> I64Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for I64Vec2 { #[inline] fn add_assign(&mut self, rhs: i64) { @@ -748,6 +975,13 @@ impl AddAssign for I64Vec2 { } } +impl AddAssign<&i64> for I64Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &i64) { + self.add_assign(*rhs) + } +} + impl Add for i64 { type Output = I64Vec2; #[inline] @@ -759,6 +993,30 @@ impl Add for i64 { } } +impl Add<&I64Vec2> for i64 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: &I64Vec2) -> I64Vec2 { + self.add(*rhs) + } +} + +impl Add<&I64Vec2> for &i64 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &i64 { + type Output = I64Vec2; + #[inline] + fn add(self, rhs: I64Vec2) -> I64Vec2 { + (*self).add(rhs) + } +} + impl Sub for I64Vec2 { type Output = Self; #[inline] @@ -770,6 +1028,30 @@ impl Sub for I64Vec2 { } } +impl Sub<&I64Vec2> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: &I64Vec2) -> I64Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&I64Vec2> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: I64Vec2) -> I64Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for I64Vec2 { #[inline] fn sub_assign(&mut self, rhs: I64Vec2) { @@ -778,6 +1060,13 @@ impl SubAssign for I64Vec2 { } } +impl SubAssign<&Self> for I64Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for I64Vec2 { type Output = Self; #[inline] @@ -789,6 +1078,30 @@ impl Sub for I64Vec2 { } } +impl Sub<&i64> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: &i64) -> I64Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&i64> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: &i64) -> I64Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: i64) -> I64Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for I64Vec2 { #[inline] fn sub_assign(&mut self, rhs: i64) { @@ -797,6 +1110,13 @@ impl SubAssign for I64Vec2 { } } +impl SubAssign<&i64> for I64Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &i64) { + self.sub_assign(*rhs) + } +} + impl Sub for i64 { type Output = I64Vec2; #[inline] @@ -808,6 +1128,30 @@ impl Sub for i64 { } } +impl Sub<&I64Vec2> for i64 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: &I64Vec2) -> I64Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&I64Vec2> for &i64 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &i64 { + type Output = I64Vec2; + #[inline] + fn sub(self, rhs: I64Vec2) -> I64Vec2 { + (*self).sub(rhs) + } +} + impl Rem for I64Vec2 { type Output = Self; #[inline] @@ -819,6 +1163,30 @@ impl Rem for I64Vec2 { } } +impl Rem<&I64Vec2> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: &I64Vec2) -> I64Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&I64Vec2> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: I64Vec2) -> I64Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for I64Vec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -827,6 +1195,13 @@ impl RemAssign for I64Vec2 { } } +impl RemAssign<&Self> for I64Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for I64Vec2 { type Output = Self; #[inline] @@ -838,6 +1213,30 @@ impl Rem for I64Vec2 { } } +impl Rem<&i64> for I64Vec2 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: &i64) -> I64Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&i64> for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: &i64) -> I64Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: i64) -> I64Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for I64Vec2 { #[inline] fn rem_assign(&mut self, rhs: i64) { @@ -846,6 +1245,13 @@ impl RemAssign for I64Vec2 { } } +impl RemAssign<&i64> for I64Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &i64) { + self.rem_assign(*rhs) + } +} + impl Rem for i64 { type Output = I64Vec2; #[inline] @@ -857,6 +1263,30 @@ impl Rem for i64 { } } +impl Rem<&I64Vec2> for i64 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: &I64Vec2) -> I64Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&I64Vec2> for &i64 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: &I64Vec2) -> I64Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &i64 { + type Output = I64Vec2; + #[inline] + fn rem(self, rhs: I64Vec2) -> I64Vec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i64; 2]> for I64Vec2 { #[inline] @@ -924,6 +1354,14 @@ impl Neg for I64Vec2 { } } +impl Neg for &I64Vec2 { + type Output = I64Vec2; + #[inline] + fn neg(self) -> I64Vec2 { + (*self).neg() + } +} + impl Not for I64Vec2 { type Output = Self; #[inline] diff --git a/src/i64/i64vec3.rs b/src/i64/i64vec3.rs index edade913..561a32ad 100644 --- a/src/i64/i64vec3.rs +++ b/src/i64/i64vec3.rs @@ -673,6 +673,30 @@ impl Div for I64Vec3 { } } +impl Div<&I64Vec3> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: &I64Vec3) -> I64Vec3 { + self.div(*rhs) + } +} + +impl Div<&I64Vec3> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: I64Vec3) -> I64Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for I64Vec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -682,6 +706,13 @@ impl DivAssign for I64Vec3 { } } +impl DivAssign<&Self> for I64Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for I64Vec3 { type Output = Self; #[inline] @@ -694,6 +725,30 @@ impl Div for I64Vec3 { } } +impl Div<&i64> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: &i64) -> I64Vec3 { + self.div(*rhs) + } +} + +impl Div<&i64> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: &i64) -> I64Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: i64) -> I64Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for I64Vec3 { #[inline] fn div_assign(&mut self, rhs: i64) { @@ -703,6 +758,13 @@ impl DivAssign for I64Vec3 { } } +impl DivAssign<&i64> for I64Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &i64) { + self.div_assign(*rhs) + } +} + impl Div for i64 { type Output = I64Vec3; #[inline] @@ -715,6 +777,30 @@ impl Div for i64 { } } +impl Div<&I64Vec3> for i64 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: &I64Vec3) -> I64Vec3 { + self.div(*rhs) + } +} + +impl Div<&I64Vec3> for &i64 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &i64 { + type Output = I64Vec3; + #[inline] + fn div(self, rhs: I64Vec3) -> I64Vec3 { + (*self).div(rhs) + } +} + impl Mul for I64Vec3 { type Output = Self; #[inline] @@ -727,6 +813,30 @@ impl Mul for I64Vec3 { } } +impl Mul<&I64Vec3> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: &I64Vec3) -> I64Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&I64Vec3> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: I64Vec3) -> I64Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for I64Vec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -736,6 +846,13 @@ impl MulAssign for I64Vec3 { } } +impl MulAssign<&Self> for I64Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for I64Vec3 { type Output = Self; #[inline] @@ -748,6 +865,30 @@ impl Mul for I64Vec3 { } } +impl Mul<&i64> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: &i64) -> I64Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&i64> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: &i64) -> I64Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: i64) -> I64Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for I64Vec3 { #[inline] fn mul_assign(&mut self, rhs: i64) { @@ -757,6 +898,13 @@ impl MulAssign for I64Vec3 { } } +impl MulAssign<&i64> for I64Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &i64) { + self.mul_assign(*rhs) + } +} + impl Mul for i64 { type Output = I64Vec3; #[inline] @@ -769,6 +917,30 @@ impl Mul for i64 { } } +impl Mul<&I64Vec3> for i64 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: &I64Vec3) -> I64Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&I64Vec3> for &i64 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &i64 { + type Output = I64Vec3; + #[inline] + fn mul(self, rhs: I64Vec3) -> I64Vec3 { + (*self).mul(rhs) + } +} + impl Add for I64Vec3 { type Output = Self; #[inline] @@ -781,6 +953,30 @@ impl Add for I64Vec3 { } } +impl Add<&I64Vec3> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: &I64Vec3) -> I64Vec3 { + self.add(*rhs) + } +} + +impl Add<&I64Vec3> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: I64Vec3) -> I64Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for I64Vec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -790,6 +986,13 @@ impl AddAssign for I64Vec3 { } } +impl AddAssign<&Self> for I64Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for I64Vec3 { type Output = Self; #[inline] @@ -802,6 +1005,30 @@ impl Add for I64Vec3 { } } +impl Add<&i64> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: &i64) -> I64Vec3 { + self.add(*rhs) + } +} + +impl Add<&i64> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: &i64) -> I64Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: i64) -> I64Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for I64Vec3 { #[inline] fn add_assign(&mut self, rhs: i64) { @@ -811,6 +1038,13 @@ impl AddAssign for I64Vec3 { } } +impl AddAssign<&i64> for I64Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &i64) { + self.add_assign(*rhs) + } +} + impl Add for i64 { type Output = I64Vec3; #[inline] @@ -823,6 +1057,30 @@ impl Add for i64 { } } +impl Add<&I64Vec3> for i64 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: &I64Vec3) -> I64Vec3 { + self.add(*rhs) + } +} + +impl Add<&I64Vec3> for &i64 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &i64 { + type Output = I64Vec3; + #[inline] + fn add(self, rhs: I64Vec3) -> I64Vec3 { + (*self).add(rhs) + } +} + impl Sub for I64Vec3 { type Output = Self; #[inline] @@ -835,6 +1093,30 @@ impl Sub for I64Vec3 { } } +impl Sub<&I64Vec3> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: &I64Vec3) -> I64Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&I64Vec3> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: I64Vec3) -> I64Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for I64Vec3 { #[inline] fn sub_assign(&mut self, rhs: I64Vec3) { @@ -844,6 +1126,13 @@ impl SubAssign for I64Vec3 { } } +impl SubAssign<&Self> for I64Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for I64Vec3 { type Output = Self; #[inline] @@ -856,6 +1145,30 @@ impl Sub for I64Vec3 { } } +impl Sub<&i64> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: &i64) -> I64Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&i64> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: &i64) -> I64Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: i64) -> I64Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for I64Vec3 { #[inline] fn sub_assign(&mut self, rhs: i64) { @@ -865,6 +1178,13 @@ impl SubAssign for I64Vec3 { } } +impl SubAssign<&i64> for I64Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &i64) { + self.sub_assign(*rhs) + } +} + impl Sub for i64 { type Output = I64Vec3; #[inline] @@ -877,6 +1197,30 @@ impl Sub for i64 { } } +impl Sub<&I64Vec3> for i64 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: &I64Vec3) -> I64Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&I64Vec3> for &i64 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &i64 { + type Output = I64Vec3; + #[inline] + fn sub(self, rhs: I64Vec3) -> I64Vec3 { + (*self).sub(rhs) + } +} + impl Rem for I64Vec3 { type Output = Self; #[inline] @@ -889,6 +1233,30 @@ impl Rem for I64Vec3 { } } +impl Rem<&I64Vec3> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: &I64Vec3) -> I64Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&I64Vec3> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: I64Vec3) -> I64Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for I64Vec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -898,6 +1266,13 @@ impl RemAssign for I64Vec3 { } } +impl RemAssign<&Self> for I64Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for I64Vec3 { type Output = Self; #[inline] @@ -910,6 +1285,30 @@ impl Rem for I64Vec3 { } } +impl Rem<&i64> for I64Vec3 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: &i64) -> I64Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&i64> for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: &i64) -> I64Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: i64) -> I64Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for I64Vec3 { #[inline] fn rem_assign(&mut self, rhs: i64) { @@ -919,6 +1318,13 @@ impl RemAssign for I64Vec3 { } } +impl RemAssign<&i64> for I64Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &i64) { + self.rem_assign(*rhs) + } +} + impl Rem for i64 { type Output = I64Vec3; #[inline] @@ -931,6 +1337,30 @@ impl Rem for i64 { } } +impl Rem<&I64Vec3> for i64 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: &I64Vec3) -> I64Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&I64Vec3> for &i64 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: &I64Vec3) -> I64Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &i64 { + type Output = I64Vec3; + #[inline] + fn rem(self, rhs: I64Vec3) -> I64Vec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i64; 3]> for I64Vec3 { #[inline] @@ -999,6 +1429,14 @@ impl Neg for I64Vec3 { } } +impl Neg for &I64Vec3 { + type Output = I64Vec3; + #[inline] + fn neg(self) -> I64Vec3 { + (*self).neg() + } +} + impl Not for I64Vec3 { type Output = Self; #[inline] diff --git a/src/i64/i64vec4.rs b/src/i64/i64vec4.rs index 5b42af0f..f3ea7e98 100644 --- a/src/i64/i64vec4.rs +++ b/src/i64/i64vec4.rs @@ -714,6 +714,30 @@ impl Div for I64Vec4 { } } +impl Div<&I64Vec4> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: &I64Vec4) -> I64Vec4 { + self.div(*rhs) + } +} + +impl Div<&I64Vec4> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: I64Vec4) -> I64Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for I64Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -724,6 +748,13 @@ impl DivAssign for I64Vec4 { } } +impl DivAssign<&Self> for I64Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for I64Vec4 { type Output = Self; #[inline] @@ -737,6 +768,30 @@ impl Div for I64Vec4 { } } +impl Div<&i64> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: &i64) -> I64Vec4 { + self.div(*rhs) + } +} + +impl Div<&i64> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: &i64) -> I64Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: i64) -> I64Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for I64Vec4 { #[inline] fn div_assign(&mut self, rhs: i64) { @@ -747,6 +802,13 @@ impl DivAssign for I64Vec4 { } } +impl DivAssign<&i64> for I64Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &i64) { + self.div_assign(*rhs) + } +} + impl Div for i64 { type Output = I64Vec4; #[inline] @@ -760,6 +822,30 @@ impl Div for i64 { } } +impl Div<&I64Vec4> for i64 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: &I64Vec4) -> I64Vec4 { + self.div(*rhs) + } +} + +impl Div<&I64Vec4> for &i64 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &i64 { + type Output = I64Vec4; + #[inline] + fn div(self, rhs: I64Vec4) -> I64Vec4 { + (*self).div(rhs) + } +} + impl Mul for I64Vec4 { type Output = Self; #[inline] @@ -773,6 +859,30 @@ impl Mul for I64Vec4 { } } +impl Mul<&I64Vec4> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: &I64Vec4) -> I64Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&I64Vec4> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: I64Vec4) -> I64Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for I64Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -783,6 +893,13 @@ impl MulAssign for I64Vec4 { } } +impl MulAssign<&Self> for I64Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for I64Vec4 { type Output = Self; #[inline] @@ -796,6 +913,30 @@ impl Mul for I64Vec4 { } } +impl Mul<&i64> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: &i64) -> I64Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&i64> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: &i64) -> I64Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: i64) -> I64Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for I64Vec4 { #[inline] fn mul_assign(&mut self, rhs: i64) { @@ -806,6 +947,13 @@ impl MulAssign for I64Vec4 { } } +impl MulAssign<&i64> for I64Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &i64) { + self.mul_assign(*rhs) + } +} + impl Mul for i64 { type Output = I64Vec4; #[inline] @@ -819,6 +967,30 @@ impl Mul for i64 { } } +impl Mul<&I64Vec4> for i64 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: &I64Vec4) -> I64Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&I64Vec4> for &i64 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &i64 { + type Output = I64Vec4; + #[inline] + fn mul(self, rhs: I64Vec4) -> I64Vec4 { + (*self).mul(rhs) + } +} + impl Add for I64Vec4 { type Output = Self; #[inline] @@ -832,6 +1004,30 @@ impl Add for I64Vec4 { } } +impl Add<&I64Vec4> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: &I64Vec4) -> I64Vec4 { + self.add(*rhs) + } +} + +impl Add<&I64Vec4> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: I64Vec4) -> I64Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for I64Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -842,6 +1038,13 @@ impl AddAssign for I64Vec4 { } } +impl AddAssign<&Self> for I64Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for I64Vec4 { type Output = Self; #[inline] @@ -855,6 +1058,30 @@ impl Add for I64Vec4 { } } +impl Add<&i64> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: &i64) -> I64Vec4 { + self.add(*rhs) + } +} + +impl Add<&i64> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: &i64) -> I64Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: i64) -> I64Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for I64Vec4 { #[inline] fn add_assign(&mut self, rhs: i64) { @@ -865,6 +1092,13 @@ impl AddAssign for I64Vec4 { } } +impl AddAssign<&i64> for I64Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &i64) { + self.add_assign(*rhs) + } +} + impl Add for i64 { type Output = I64Vec4; #[inline] @@ -878,6 +1112,30 @@ impl Add for i64 { } } +impl Add<&I64Vec4> for i64 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: &I64Vec4) -> I64Vec4 { + self.add(*rhs) + } +} + +impl Add<&I64Vec4> for &i64 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &i64 { + type Output = I64Vec4; + #[inline] + fn add(self, rhs: I64Vec4) -> I64Vec4 { + (*self).add(rhs) + } +} + impl Sub for I64Vec4 { type Output = Self; #[inline] @@ -891,6 +1149,30 @@ impl Sub for I64Vec4 { } } +impl Sub<&I64Vec4> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: &I64Vec4) -> I64Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&I64Vec4> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: I64Vec4) -> I64Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for I64Vec4 { #[inline] fn sub_assign(&mut self, rhs: I64Vec4) { @@ -901,6 +1183,13 @@ impl SubAssign for I64Vec4 { } } +impl SubAssign<&Self> for I64Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for I64Vec4 { type Output = Self; #[inline] @@ -914,6 +1203,30 @@ impl Sub for I64Vec4 { } } +impl Sub<&i64> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: &i64) -> I64Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&i64> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: &i64) -> I64Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: i64) -> I64Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for I64Vec4 { #[inline] fn sub_assign(&mut self, rhs: i64) { @@ -924,6 +1237,13 @@ impl SubAssign for I64Vec4 { } } +impl SubAssign<&i64> for I64Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &i64) { + self.sub_assign(*rhs) + } +} + impl Sub for i64 { type Output = I64Vec4; #[inline] @@ -937,6 +1257,30 @@ impl Sub for i64 { } } +impl Sub<&I64Vec4> for i64 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: &I64Vec4) -> I64Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&I64Vec4> for &i64 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &i64 { + type Output = I64Vec4; + #[inline] + fn sub(self, rhs: I64Vec4) -> I64Vec4 { + (*self).sub(rhs) + } +} + impl Rem for I64Vec4 { type Output = Self; #[inline] @@ -950,6 +1294,30 @@ impl Rem for I64Vec4 { } } +impl Rem<&I64Vec4> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: &I64Vec4) -> I64Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&I64Vec4> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: I64Vec4) -> I64Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for I64Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -960,6 +1328,13 @@ impl RemAssign for I64Vec4 { } } +impl RemAssign<&Self> for I64Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for I64Vec4 { type Output = Self; #[inline] @@ -973,6 +1348,30 @@ impl Rem for I64Vec4 { } } +impl Rem<&i64> for I64Vec4 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: &i64) -> I64Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&i64> for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: &i64) -> I64Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: i64) -> I64Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for I64Vec4 { #[inline] fn rem_assign(&mut self, rhs: i64) { @@ -983,6 +1382,13 @@ impl RemAssign for I64Vec4 { } } +impl RemAssign<&i64> for I64Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &i64) { + self.rem_assign(*rhs) + } +} + impl Rem for i64 { type Output = I64Vec4; #[inline] @@ -996,6 +1402,30 @@ impl Rem for i64 { } } +impl Rem<&I64Vec4> for i64 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: &I64Vec4) -> I64Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&I64Vec4> for &i64 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: &I64Vec4) -> I64Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &i64 { + type Output = I64Vec4; + #[inline] + fn rem(self, rhs: I64Vec4) -> I64Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[i64; 4]> for I64Vec4 { #[inline] @@ -1065,6 +1495,14 @@ impl Neg for I64Vec4 { } } +impl Neg for &I64Vec4 { + type Output = I64Vec4; + #[inline] + fn neg(self) -> I64Vec4 { + (*self).neg() + } +} + impl Not for I64Vec4 { type Output = Self; #[inline] diff --git a/src/u16/u16vec2.rs b/src/u16/u16vec2.rs index 5b4cb6af..54807c83 100644 --- a/src/u16/u16vec2.rs +++ b/src/u16/u16vec2.rs @@ -494,6 +494,30 @@ impl Div for U16Vec2 { } } +impl Div<&U16Vec2> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: &U16Vec2) -> U16Vec2 { + self.div(*rhs) + } +} + +impl Div<&U16Vec2> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: U16Vec2) -> U16Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for U16Vec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -502,6 +526,13 @@ impl DivAssign for U16Vec2 { } } +impl DivAssign<&Self> for U16Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for U16Vec2 { type Output = Self; #[inline] @@ -513,6 +544,30 @@ impl Div for U16Vec2 { } } +impl Div<&u16> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: &u16) -> U16Vec2 { + self.div(*rhs) + } +} + +impl Div<&u16> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: &u16) -> U16Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: u16) -> U16Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for U16Vec2 { #[inline] fn div_assign(&mut self, rhs: u16) { @@ -521,6 +576,13 @@ impl DivAssign for U16Vec2 { } } +impl DivAssign<&u16> for U16Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &u16) { + self.div_assign(*rhs) + } +} + impl Div for u16 { type Output = U16Vec2; #[inline] @@ -532,6 +594,30 @@ impl Div for u16 { } } +impl Div<&U16Vec2> for u16 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: &U16Vec2) -> U16Vec2 { + self.div(*rhs) + } +} + +impl Div<&U16Vec2> for &u16 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &u16 { + type Output = U16Vec2; + #[inline] + fn div(self, rhs: U16Vec2) -> U16Vec2 { + (*self).div(rhs) + } +} + impl Mul for U16Vec2 { type Output = Self; #[inline] @@ -543,6 +629,30 @@ impl Mul for U16Vec2 { } } +impl Mul<&U16Vec2> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: &U16Vec2) -> U16Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&U16Vec2> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: U16Vec2) -> U16Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for U16Vec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -551,6 +661,13 @@ impl MulAssign for U16Vec2 { } } +impl MulAssign<&Self> for U16Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for U16Vec2 { type Output = Self; #[inline] @@ -562,6 +679,30 @@ impl Mul for U16Vec2 { } } +impl Mul<&u16> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: &u16) -> U16Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&u16> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: &u16) -> U16Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: u16) -> U16Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for U16Vec2 { #[inline] fn mul_assign(&mut self, rhs: u16) { @@ -570,6 +711,13 @@ impl MulAssign for U16Vec2 { } } +impl MulAssign<&u16> for U16Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &u16) { + self.mul_assign(*rhs) + } +} + impl Mul for u16 { type Output = U16Vec2; #[inline] @@ -581,6 +729,30 @@ impl Mul for u16 { } } +impl Mul<&U16Vec2> for u16 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: &U16Vec2) -> U16Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&U16Vec2> for &u16 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &u16 { + type Output = U16Vec2; + #[inline] + fn mul(self, rhs: U16Vec2) -> U16Vec2 { + (*self).mul(rhs) + } +} + impl Add for U16Vec2 { type Output = Self; #[inline] @@ -592,6 +764,30 @@ impl Add for U16Vec2 { } } +impl Add<&U16Vec2> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: &U16Vec2) -> U16Vec2 { + self.add(*rhs) + } +} + +impl Add<&U16Vec2> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: U16Vec2) -> U16Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for U16Vec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -600,6 +796,13 @@ impl AddAssign for U16Vec2 { } } +impl AddAssign<&Self> for U16Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for U16Vec2 { type Output = Self; #[inline] @@ -611,6 +814,30 @@ impl Add for U16Vec2 { } } +impl Add<&u16> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: &u16) -> U16Vec2 { + self.add(*rhs) + } +} + +impl Add<&u16> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: &u16) -> U16Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: u16) -> U16Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for U16Vec2 { #[inline] fn add_assign(&mut self, rhs: u16) { @@ -619,6 +846,13 @@ impl AddAssign for U16Vec2 { } } +impl AddAssign<&u16> for U16Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &u16) { + self.add_assign(*rhs) + } +} + impl Add for u16 { type Output = U16Vec2; #[inline] @@ -630,6 +864,30 @@ impl Add for u16 { } } +impl Add<&U16Vec2> for u16 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: &U16Vec2) -> U16Vec2 { + self.add(*rhs) + } +} + +impl Add<&U16Vec2> for &u16 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &u16 { + type Output = U16Vec2; + #[inline] + fn add(self, rhs: U16Vec2) -> U16Vec2 { + (*self).add(rhs) + } +} + impl Sub for U16Vec2 { type Output = Self; #[inline] @@ -641,6 +899,30 @@ impl Sub for U16Vec2 { } } +impl Sub<&U16Vec2> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: &U16Vec2) -> U16Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&U16Vec2> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: U16Vec2) -> U16Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for U16Vec2 { #[inline] fn sub_assign(&mut self, rhs: U16Vec2) { @@ -649,6 +931,13 @@ impl SubAssign for U16Vec2 { } } +impl SubAssign<&Self> for U16Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for U16Vec2 { type Output = Self; #[inline] @@ -660,6 +949,30 @@ impl Sub for U16Vec2 { } } +impl Sub<&u16> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: &u16) -> U16Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&u16> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: &u16) -> U16Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: u16) -> U16Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for U16Vec2 { #[inline] fn sub_assign(&mut self, rhs: u16) { @@ -668,6 +981,13 @@ impl SubAssign for U16Vec2 { } } +impl SubAssign<&u16> for U16Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &u16) { + self.sub_assign(*rhs) + } +} + impl Sub for u16 { type Output = U16Vec2; #[inline] @@ -679,6 +999,30 @@ impl Sub for u16 { } } +impl Sub<&U16Vec2> for u16 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: &U16Vec2) -> U16Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&U16Vec2> for &u16 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &u16 { + type Output = U16Vec2; + #[inline] + fn sub(self, rhs: U16Vec2) -> U16Vec2 { + (*self).sub(rhs) + } +} + impl Rem for U16Vec2 { type Output = Self; #[inline] @@ -690,6 +1034,30 @@ impl Rem for U16Vec2 { } } +impl Rem<&U16Vec2> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: &U16Vec2) -> U16Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&U16Vec2> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: U16Vec2) -> U16Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for U16Vec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -698,6 +1066,13 @@ impl RemAssign for U16Vec2 { } } +impl RemAssign<&Self> for U16Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for U16Vec2 { type Output = Self; #[inline] @@ -709,6 +1084,30 @@ impl Rem for U16Vec2 { } } +impl Rem<&u16> for U16Vec2 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: &u16) -> U16Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&u16> for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: &u16) -> U16Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &U16Vec2 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: u16) -> U16Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for U16Vec2 { #[inline] fn rem_assign(&mut self, rhs: u16) { @@ -717,6 +1116,13 @@ impl RemAssign for U16Vec2 { } } +impl RemAssign<&u16> for U16Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &u16) { + self.rem_assign(*rhs) + } +} + impl Rem for u16 { type Output = U16Vec2; #[inline] @@ -728,6 +1134,30 @@ impl Rem for u16 { } } +impl Rem<&U16Vec2> for u16 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: &U16Vec2) -> U16Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&U16Vec2> for &u16 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: &U16Vec2) -> U16Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &u16 { + type Output = U16Vec2; + #[inline] + fn rem(self, rhs: U16Vec2) -> U16Vec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u16; 2]> for U16Vec2 { #[inline] diff --git a/src/u16/u16vec3.rs b/src/u16/u16vec3.rs index b560a49b..9886209d 100644 --- a/src/u16/u16vec3.rs +++ b/src/u16/u16vec3.rs @@ -560,6 +560,30 @@ impl Div for U16Vec3 { } } +impl Div<&U16Vec3> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: &U16Vec3) -> U16Vec3 { + self.div(*rhs) + } +} + +impl Div<&U16Vec3> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: U16Vec3) -> U16Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for U16Vec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -569,6 +593,13 @@ impl DivAssign for U16Vec3 { } } +impl DivAssign<&Self> for U16Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for U16Vec3 { type Output = Self; #[inline] @@ -581,6 +612,30 @@ impl Div for U16Vec3 { } } +impl Div<&u16> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: &u16) -> U16Vec3 { + self.div(*rhs) + } +} + +impl Div<&u16> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: &u16) -> U16Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: u16) -> U16Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for U16Vec3 { #[inline] fn div_assign(&mut self, rhs: u16) { @@ -590,6 +645,13 @@ impl DivAssign for U16Vec3 { } } +impl DivAssign<&u16> for U16Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &u16) { + self.div_assign(*rhs) + } +} + impl Div for u16 { type Output = U16Vec3; #[inline] @@ -602,6 +664,30 @@ impl Div for u16 { } } +impl Div<&U16Vec3> for u16 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: &U16Vec3) -> U16Vec3 { + self.div(*rhs) + } +} + +impl Div<&U16Vec3> for &u16 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &u16 { + type Output = U16Vec3; + #[inline] + fn div(self, rhs: U16Vec3) -> U16Vec3 { + (*self).div(rhs) + } +} + impl Mul for U16Vec3 { type Output = Self; #[inline] @@ -614,6 +700,30 @@ impl Mul for U16Vec3 { } } +impl Mul<&U16Vec3> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: &U16Vec3) -> U16Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&U16Vec3> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: U16Vec3) -> U16Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for U16Vec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -623,6 +733,13 @@ impl MulAssign for U16Vec3 { } } +impl MulAssign<&Self> for U16Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for U16Vec3 { type Output = Self; #[inline] @@ -635,6 +752,30 @@ impl Mul for U16Vec3 { } } +impl Mul<&u16> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: &u16) -> U16Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&u16> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: &u16) -> U16Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: u16) -> U16Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for U16Vec3 { #[inline] fn mul_assign(&mut self, rhs: u16) { @@ -644,6 +785,13 @@ impl MulAssign for U16Vec3 { } } +impl MulAssign<&u16> for U16Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &u16) { + self.mul_assign(*rhs) + } +} + impl Mul for u16 { type Output = U16Vec3; #[inline] @@ -656,6 +804,30 @@ impl Mul for u16 { } } +impl Mul<&U16Vec3> for u16 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: &U16Vec3) -> U16Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&U16Vec3> for &u16 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &u16 { + type Output = U16Vec3; + #[inline] + fn mul(self, rhs: U16Vec3) -> U16Vec3 { + (*self).mul(rhs) + } +} + impl Add for U16Vec3 { type Output = Self; #[inline] @@ -668,6 +840,30 @@ impl Add for U16Vec3 { } } +impl Add<&U16Vec3> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: &U16Vec3) -> U16Vec3 { + self.add(*rhs) + } +} + +impl Add<&U16Vec3> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: U16Vec3) -> U16Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for U16Vec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -677,6 +873,13 @@ impl AddAssign for U16Vec3 { } } +impl AddAssign<&Self> for U16Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for U16Vec3 { type Output = Self; #[inline] @@ -689,6 +892,30 @@ impl Add for U16Vec3 { } } +impl Add<&u16> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: &u16) -> U16Vec3 { + self.add(*rhs) + } +} + +impl Add<&u16> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: &u16) -> U16Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: u16) -> U16Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for U16Vec3 { #[inline] fn add_assign(&mut self, rhs: u16) { @@ -698,6 +925,13 @@ impl AddAssign for U16Vec3 { } } +impl AddAssign<&u16> for U16Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &u16) { + self.add_assign(*rhs) + } +} + impl Add for u16 { type Output = U16Vec3; #[inline] @@ -710,6 +944,30 @@ impl Add for u16 { } } +impl Add<&U16Vec3> for u16 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: &U16Vec3) -> U16Vec3 { + self.add(*rhs) + } +} + +impl Add<&U16Vec3> for &u16 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &u16 { + type Output = U16Vec3; + #[inline] + fn add(self, rhs: U16Vec3) -> U16Vec3 { + (*self).add(rhs) + } +} + impl Sub for U16Vec3 { type Output = Self; #[inline] @@ -722,6 +980,30 @@ impl Sub for U16Vec3 { } } +impl Sub<&U16Vec3> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: &U16Vec3) -> U16Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&U16Vec3> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: U16Vec3) -> U16Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for U16Vec3 { #[inline] fn sub_assign(&mut self, rhs: U16Vec3) { @@ -731,6 +1013,13 @@ impl SubAssign for U16Vec3 { } } +impl SubAssign<&Self> for U16Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for U16Vec3 { type Output = Self; #[inline] @@ -743,6 +1032,30 @@ impl Sub for U16Vec3 { } } +impl Sub<&u16> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: &u16) -> U16Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&u16> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: &u16) -> U16Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: u16) -> U16Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for U16Vec3 { #[inline] fn sub_assign(&mut self, rhs: u16) { @@ -752,6 +1065,13 @@ impl SubAssign for U16Vec3 { } } +impl SubAssign<&u16> for U16Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &u16) { + self.sub_assign(*rhs) + } +} + impl Sub for u16 { type Output = U16Vec3; #[inline] @@ -764,6 +1084,30 @@ impl Sub for u16 { } } +impl Sub<&U16Vec3> for u16 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: &U16Vec3) -> U16Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&U16Vec3> for &u16 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &u16 { + type Output = U16Vec3; + #[inline] + fn sub(self, rhs: U16Vec3) -> U16Vec3 { + (*self).sub(rhs) + } +} + impl Rem for U16Vec3 { type Output = Self; #[inline] @@ -776,6 +1120,30 @@ impl Rem for U16Vec3 { } } +impl Rem<&U16Vec3> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: &U16Vec3) -> U16Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&U16Vec3> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: U16Vec3) -> U16Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for U16Vec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -785,6 +1153,13 @@ impl RemAssign for U16Vec3 { } } +impl RemAssign<&Self> for U16Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for U16Vec3 { type Output = Self; #[inline] @@ -797,6 +1172,30 @@ impl Rem for U16Vec3 { } } +impl Rem<&u16> for U16Vec3 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: &u16) -> U16Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&u16> for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: &u16) -> U16Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &U16Vec3 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: u16) -> U16Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for U16Vec3 { #[inline] fn rem_assign(&mut self, rhs: u16) { @@ -806,6 +1205,13 @@ impl RemAssign for U16Vec3 { } } +impl RemAssign<&u16> for U16Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &u16) { + self.rem_assign(*rhs) + } +} + impl Rem for u16 { type Output = U16Vec3; #[inline] @@ -818,6 +1224,30 @@ impl Rem for u16 { } } +impl Rem<&U16Vec3> for u16 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: &U16Vec3) -> U16Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&U16Vec3> for &u16 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: &U16Vec3) -> U16Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &u16 { + type Output = U16Vec3; + #[inline] + fn rem(self, rhs: U16Vec3) -> U16Vec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u16; 3]> for U16Vec3 { #[inline] diff --git a/src/u16/u16vec4.rs b/src/u16/u16vec4.rs index 982466cb..723b5ea2 100644 --- a/src/u16/u16vec4.rs +++ b/src/u16/u16vec4.rs @@ -591,6 +591,30 @@ impl Div for U16Vec4 { } } +impl Div<&U16Vec4> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: &U16Vec4) -> U16Vec4 { + self.div(*rhs) + } +} + +impl Div<&U16Vec4> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: U16Vec4) -> U16Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for U16Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -601,6 +625,13 @@ impl DivAssign for U16Vec4 { } } +impl DivAssign<&Self> for U16Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for U16Vec4 { type Output = Self; #[inline] @@ -614,6 +645,30 @@ impl Div for U16Vec4 { } } +impl Div<&u16> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: &u16) -> U16Vec4 { + self.div(*rhs) + } +} + +impl Div<&u16> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: &u16) -> U16Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: u16) -> U16Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for U16Vec4 { #[inline] fn div_assign(&mut self, rhs: u16) { @@ -624,6 +679,13 @@ impl DivAssign for U16Vec4 { } } +impl DivAssign<&u16> for U16Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &u16) { + self.div_assign(*rhs) + } +} + impl Div for u16 { type Output = U16Vec4; #[inline] @@ -637,6 +699,30 @@ impl Div for u16 { } } +impl Div<&U16Vec4> for u16 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: &U16Vec4) -> U16Vec4 { + self.div(*rhs) + } +} + +impl Div<&U16Vec4> for &u16 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &u16 { + type Output = U16Vec4; + #[inline] + fn div(self, rhs: U16Vec4) -> U16Vec4 { + (*self).div(rhs) + } +} + impl Mul for U16Vec4 { type Output = Self; #[inline] @@ -650,6 +736,30 @@ impl Mul for U16Vec4 { } } +impl Mul<&U16Vec4> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: &U16Vec4) -> U16Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&U16Vec4> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: U16Vec4) -> U16Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for U16Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -660,6 +770,13 @@ impl MulAssign for U16Vec4 { } } +impl MulAssign<&Self> for U16Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for U16Vec4 { type Output = Self; #[inline] @@ -673,6 +790,30 @@ impl Mul for U16Vec4 { } } +impl Mul<&u16> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: &u16) -> U16Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&u16> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: &u16) -> U16Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: u16) -> U16Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for U16Vec4 { #[inline] fn mul_assign(&mut self, rhs: u16) { @@ -683,6 +824,13 @@ impl MulAssign for U16Vec4 { } } +impl MulAssign<&u16> for U16Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &u16) { + self.mul_assign(*rhs) + } +} + impl Mul for u16 { type Output = U16Vec4; #[inline] @@ -696,6 +844,30 @@ impl Mul for u16 { } } +impl Mul<&U16Vec4> for u16 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: &U16Vec4) -> U16Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&U16Vec4> for &u16 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &u16 { + type Output = U16Vec4; + #[inline] + fn mul(self, rhs: U16Vec4) -> U16Vec4 { + (*self).mul(rhs) + } +} + impl Add for U16Vec4 { type Output = Self; #[inline] @@ -709,6 +881,30 @@ impl Add for U16Vec4 { } } +impl Add<&U16Vec4> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: &U16Vec4) -> U16Vec4 { + self.add(*rhs) + } +} + +impl Add<&U16Vec4> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: U16Vec4) -> U16Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for U16Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -719,6 +915,13 @@ impl AddAssign for U16Vec4 { } } +impl AddAssign<&Self> for U16Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for U16Vec4 { type Output = Self; #[inline] @@ -732,6 +935,30 @@ impl Add for U16Vec4 { } } +impl Add<&u16> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: &u16) -> U16Vec4 { + self.add(*rhs) + } +} + +impl Add<&u16> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: &u16) -> U16Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: u16) -> U16Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for U16Vec4 { #[inline] fn add_assign(&mut self, rhs: u16) { @@ -742,6 +969,13 @@ impl AddAssign for U16Vec4 { } } +impl AddAssign<&u16> for U16Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &u16) { + self.add_assign(*rhs) + } +} + impl Add for u16 { type Output = U16Vec4; #[inline] @@ -755,6 +989,30 @@ impl Add for u16 { } } +impl Add<&U16Vec4> for u16 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: &U16Vec4) -> U16Vec4 { + self.add(*rhs) + } +} + +impl Add<&U16Vec4> for &u16 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &u16 { + type Output = U16Vec4; + #[inline] + fn add(self, rhs: U16Vec4) -> U16Vec4 { + (*self).add(rhs) + } +} + impl Sub for U16Vec4 { type Output = Self; #[inline] @@ -768,6 +1026,30 @@ impl Sub for U16Vec4 { } } +impl Sub<&U16Vec4> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: &U16Vec4) -> U16Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&U16Vec4> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: U16Vec4) -> U16Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for U16Vec4 { #[inline] fn sub_assign(&mut self, rhs: U16Vec4) { @@ -778,6 +1060,13 @@ impl SubAssign for U16Vec4 { } } +impl SubAssign<&Self> for U16Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for U16Vec4 { type Output = Self; #[inline] @@ -791,6 +1080,30 @@ impl Sub for U16Vec4 { } } +impl Sub<&u16> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: &u16) -> U16Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&u16> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: &u16) -> U16Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: u16) -> U16Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for U16Vec4 { #[inline] fn sub_assign(&mut self, rhs: u16) { @@ -801,6 +1114,13 @@ impl SubAssign for U16Vec4 { } } +impl SubAssign<&u16> for U16Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &u16) { + self.sub_assign(*rhs) + } +} + impl Sub for u16 { type Output = U16Vec4; #[inline] @@ -814,6 +1134,30 @@ impl Sub for u16 { } } +impl Sub<&U16Vec4> for u16 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: &U16Vec4) -> U16Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&U16Vec4> for &u16 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &u16 { + type Output = U16Vec4; + #[inline] + fn sub(self, rhs: U16Vec4) -> U16Vec4 { + (*self).sub(rhs) + } +} + impl Rem for U16Vec4 { type Output = Self; #[inline] @@ -827,6 +1171,30 @@ impl Rem for U16Vec4 { } } +impl Rem<&U16Vec4> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: &U16Vec4) -> U16Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&U16Vec4> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: U16Vec4) -> U16Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for U16Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -837,6 +1205,13 @@ impl RemAssign for U16Vec4 { } } +impl RemAssign<&Self> for U16Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for U16Vec4 { type Output = Self; #[inline] @@ -850,6 +1225,30 @@ impl Rem for U16Vec4 { } } +impl Rem<&u16> for U16Vec4 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: &u16) -> U16Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&u16> for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: &u16) -> U16Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &U16Vec4 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: u16) -> U16Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for U16Vec4 { #[inline] fn rem_assign(&mut self, rhs: u16) { @@ -860,6 +1259,13 @@ impl RemAssign for U16Vec4 { } } +impl RemAssign<&u16> for U16Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &u16) { + self.rem_assign(*rhs) + } +} + impl Rem for u16 { type Output = U16Vec4; #[inline] @@ -873,6 +1279,30 @@ impl Rem for u16 { } } +impl Rem<&U16Vec4> for u16 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: &U16Vec4) -> U16Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&U16Vec4> for &u16 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: &U16Vec4) -> U16Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &u16 { + type Output = U16Vec4; + #[inline] + fn rem(self, rhs: U16Vec4) -> U16Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u16; 4]> for U16Vec4 { #[inline] diff --git a/src/u32/uvec2.rs b/src/u32/uvec2.rs index 40cc663c..3958d165 100644 --- a/src/u32/uvec2.rs +++ b/src/u32/uvec2.rs @@ -494,6 +494,30 @@ impl Div for UVec2 { } } +impl Div<&UVec2> for UVec2 { + type Output = UVec2; + #[inline] + fn div(self, rhs: &UVec2) -> UVec2 { + self.div(*rhs) + } +} + +impl Div<&UVec2> for &UVec2 { + type Output = UVec2; + #[inline] + fn div(self, rhs: &UVec2) -> UVec2 { + (*self).div(*rhs) + } +} + +impl Div for &UVec2 { + type Output = UVec2; + #[inline] + fn div(self, rhs: UVec2) -> UVec2 { + (*self).div(rhs) + } +} + impl DivAssign for UVec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -502,6 +526,13 @@ impl DivAssign for UVec2 { } } +impl DivAssign<&Self> for UVec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for UVec2 { type Output = Self; #[inline] @@ -513,6 +544,30 @@ impl Div for UVec2 { } } +impl Div<&u32> for UVec2 { + type Output = UVec2; + #[inline] + fn div(self, rhs: &u32) -> UVec2 { + self.div(*rhs) + } +} + +impl Div<&u32> for &UVec2 { + type Output = UVec2; + #[inline] + fn div(self, rhs: &u32) -> UVec2 { + (*self).div(*rhs) + } +} + +impl Div for &UVec2 { + type Output = UVec2; + #[inline] + fn div(self, rhs: u32) -> UVec2 { + (*self).div(rhs) + } +} + impl DivAssign for UVec2 { #[inline] fn div_assign(&mut self, rhs: u32) { @@ -521,6 +576,13 @@ impl DivAssign for UVec2 { } } +impl DivAssign<&u32> for UVec2 { + #[inline] + fn div_assign(&mut self, rhs: &u32) { + self.div_assign(*rhs) + } +} + impl Div for u32 { type Output = UVec2; #[inline] @@ -532,6 +594,30 @@ impl Div for u32 { } } +impl Div<&UVec2> for u32 { + type Output = UVec2; + #[inline] + fn div(self, rhs: &UVec2) -> UVec2 { + self.div(*rhs) + } +} + +impl Div<&UVec2> for &u32 { + type Output = UVec2; + #[inline] + fn div(self, rhs: &UVec2) -> UVec2 { + (*self).div(*rhs) + } +} + +impl Div for &u32 { + type Output = UVec2; + #[inline] + fn div(self, rhs: UVec2) -> UVec2 { + (*self).div(rhs) + } +} + impl Mul for UVec2 { type Output = Self; #[inline] @@ -543,6 +629,30 @@ impl Mul for UVec2 { } } +impl Mul<&UVec2> for UVec2 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: &UVec2) -> UVec2 { + self.mul(*rhs) + } +} + +impl Mul<&UVec2> for &UVec2 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: &UVec2) -> UVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &UVec2 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: UVec2) -> UVec2 { + (*self).mul(rhs) + } +} + impl MulAssign for UVec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -551,6 +661,13 @@ impl MulAssign for UVec2 { } } +impl MulAssign<&Self> for UVec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for UVec2 { type Output = Self; #[inline] @@ -562,6 +679,30 @@ impl Mul for UVec2 { } } +impl Mul<&u32> for UVec2 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: &u32) -> UVec2 { + self.mul(*rhs) + } +} + +impl Mul<&u32> for &UVec2 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: &u32) -> UVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &UVec2 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: u32) -> UVec2 { + (*self).mul(rhs) + } +} + impl MulAssign for UVec2 { #[inline] fn mul_assign(&mut self, rhs: u32) { @@ -570,6 +711,13 @@ impl MulAssign for UVec2 { } } +impl MulAssign<&u32> for UVec2 { + #[inline] + fn mul_assign(&mut self, rhs: &u32) { + self.mul_assign(*rhs) + } +} + impl Mul for u32 { type Output = UVec2; #[inline] @@ -581,6 +729,30 @@ impl Mul for u32 { } } +impl Mul<&UVec2> for u32 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: &UVec2) -> UVec2 { + self.mul(*rhs) + } +} + +impl Mul<&UVec2> for &u32 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: &UVec2) -> UVec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &u32 { + type Output = UVec2; + #[inline] + fn mul(self, rhs: UVec2) -> UVec2 { + (*self).mul(rhs) + } +} + impl Add for UVec2 { type Output = Self; #[inline] @@ -592,6 +764,30 @@ impl Add for UVec2 { } } +impl Add<&UVec2> for UVec2 { + type Output = UVec2; + #[inline] + fn add(self, rhs: &UVec2) -> UVec2 { + self.add(*rhs) + } +} + +impl Add<&UVec2> for &UVec2 { + type Output = UVec2; + #[inline] + fn add(self, rhs: &UVec2) -> UVec2 { + (*self).add(*rhs) + } +} + +impl Add for &UVec2 { + type Output = UVec2; + #[inline] + fn add(self, rhs: UVec2) -> UVec2 { + (*self).add(rhs) + } +} + impl AddAssign for UVec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -600,6 +796,13 @@ impl AddAssign for UVec2 { } } +impl AddAssign<&Self> for UVec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for UVec2 { type Output = Self; #[inline] @@ -611,6 +814,30 @@ impl Add for UVec2 { } } +impl Add<&u32> for UVec2 { + type Output = UVec2; + #[inline] + fn add(self, rhs: &u32) -> UVec2 { + self.add(*rhs) + } +} + +impl Add<&u32> for &UVec2 { + type Output = UVec2; + #[inline] + fn add(self, rhs: &u32) -> UVec2 { + (*self).add(*rhs) + } +} + +impl Add for &UVec2 { + type Output = UVec2; + #[inline] + fn add(self, rhs: u32) -> UVec2 { + (*self).add(rhs) + } +} + impl AddAssign for UVec2 { #[inline] fn add_assign(&mut self, rhs: u32) { @@ -619,6 +846,13 @@ impl AddAssign for UVec2 { } } +impl AddAssign<&u32> for UVec2 { + #[inline] + fn add_assign(&mut self, rhs: &u32) { + self.add_assign(*rhs) + } +} + impl Add for u32 { type Output = UVec2; #[inline] @@ -630,6 +864,30 @@ impl Add for u32 { } } +impl Add<&UVec2> for u32 { + type Output = UVec2; + #[inline] + fn add(self, rhs: &UVec2) -> UVec2 { + self.add(*rhs) + } +} + +impl Add<&UVec2> for &u32 { + type Output = UVec2; + #[inline] + fn add(self, rhs: &UVec2) -> UVec2 { + (*self).add(*rhs) + } +} + +impl Add for &u32 { + type Output = UVec2; + #[inline] + fn add(self, rhs: UVec2) -> UVec2 { + (*self).add(rhs) + } +} + impl Sub for UVec2 { type Output = Self; #[inline] @@ -641,6 +899,30 @@ impl Sub for UVec2 { } } +impl Sub<&UVec2> for UVec2 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: &UVec2) -> UVec2 { + self.sub(*rhs) + } +} + +impl Sub<&UVec2> for &UVec2 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: &UVec2) -> UVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &UVec2 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: UVec2) -> UVec2 { + (*self).sub(rhs) + } +} + impl SubAssign for UVec2 { #[inline] fn sub_assign(&mut self, rhs: UVec2) { @@ -649,6 +931,13 @@ impl SubAssign for UVec2 { } } +impl SubAssign<&Self> for UVec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for UVec2 { type Output = Self; #[inline] @@ -660,6 +949,30 @@ impl Sub for UVec2 { } } +impl Sub<&u32> for UVec2 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: &u32) -> UVec2 { + self.sub(*rhs) + } +} + +impl Sub<&u32> for &UVec2 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: &u32) -> UVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &UVec2 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: u32) -> UVec2 { + (*self).sub(rhs) + } +} + impl SubAssign for UVec2 { #[inline] fn sub_assign(&mut self, rhs: u32) { @@ -668,6 +981,13 @@ impl SubAssign for UVec2 { } } +impl SubAssign<&u32> for UVec2 { + #[inline] + fn sub_assign(&mut self, rhs: &u32) { + self.sub_assign(*rhs) + } +} + impl Sub for u32 { type Output = UVec2; #[inline] @@ -679,6 +999,30 @@ impl Sub for u32 { } } +impl Sub<&UVec2> for u32 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: &UVec2) -> UVec2 { + self.sub(*rhs) + } +} + +impl Sub<&UVec2> for &u32 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: &UVec2) -> UVec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &u32 { + type Output = UVec2; + #[inline] + fn sub(self, rhs: UVec2) -> UVec2 { + (*self).sub(rhs) + } +} + impl Rem for UVec2 { type Output = Self; #[inline] @@ -690,6 +1034,30 @@ impl Rem for UVec2 { } } +impl Rem<&UVec2> for UVec2 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: &UVec2) -> UVec2 { + self.rem(*rhs) + } +} + +impl Rem<&UVec2> for &UVec2 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: &UVec2) -> UVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &UVec2 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: UVec2) -> UVec2 { + (*self).rem(rhs) + } +} + impl RemAssign for UVec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -698,6 +1066,13 @@ impl RemAssign for UVec2 { } } +impl RemAssign<&Self> for UVec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for UVec2 { type Output = Self; #[inline] @@ -709,6 +1084,30 @@ impl Rem for UVec2 { } } +impl Rem<&u32> for UVec2 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: &u32) -> UVec2 { + self.rem(*rhs) + } +} + +impl Rem<&u32> for &UVec2 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: &u32) -> UVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &UVec2 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: u32) -> UVec2 { + (*self).rem(rhs) + } +} + impl RemAssign for UVec2 { #[inline] fn rem_assign(&mut self, rhs: u32) { @@ -717,6 +1116,13 @@ impl RemAssign for UVec2 { } } +impl RemAssign<&u32> for UVec2 { + #[inline] + fn rem_assign(&mut self, rhs: &u32) { + self.rem_assign(*rhs) + } +} + impl Rem for u32 { type Output = UVec2; #[inline] @@ -728,6 +1134,30 @@ impl Rem for u32 { } } +impl Rem<&UVec2> for u32 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: &UVec2) -> UVec2 { + self.rem(*rhs) + } +} + +impl Rem<&UVec2> for &u32 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: &UVec2) -> UVec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &u32 { + type Output = UVec2; + #[inline] + fn rem(self, rhs: UVec2) -> UVec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u32; 2]> for UVec2 { #[inline] diff --git a/src/u32/uvec3.rs b/src/u32/uvec3.rs index 96f7501e..8f4963af 100644 --- a/src/u32/uvec3.rs +++ b/src/u32/uvec3.rs @@ -560,6 +560,30 @@ impl Div for UVec3 { } } +impl Div<&UVec3> for UVec3 { + type Output = UVec3; + #[inline] + fn div(self, rhs: &UVec3) -> UVec3 { + self.div(*rhs) + } +} + +impl Div<&UVec3> for &UVec3 { + type Output = UVec3; + #[inline] + fn div(self, rhs: &UVec3) -> UVec3 { + (*self).div(*rhs) + } +} + +impl Div for &UVec3 { + type Output = UVec3; + #[inline] + fn div(self, rhs: UVec3) -> UVec3 { + (*self).div(rhs) + } +} + impl DivAssign for UVec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -569,6 +593,13 @@ impl DivAssign for UVec3 { } } +impl DivAssign<&Self> for UVec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for UVec3 { type Output = Self; #[inline] @@ -581,6 +612,30 @@ impl Div for UVec3 { } } +impl Div<&u32> for UVec3 { + type Output = UVec3; + #[inline] + fn div(self, rhs: &u32) -> UVec3 { + self.div(*rhs) + } +} + +impl Div<&u32> for &UVec3 { + type Output = UVec3; + #[inline] + fn div(self, rhs: &u32) -> UVec3 { + (*self).div(*rhs) + } +} + +impl Div for &UVec3 { + type Output = UVec3; + #[inline] + fn div(self, rhs: u32) -> UVec3 { + (*self).div(rhs) + } +} + impl DivAssign for UVec3 { #[inline] fn div_assign(&mut self, rhs: u32) { @@ -590,6 +645,13 @@ impl DivAssign for UVec3 { } } +impl DivAssign<&u32> for UVec3 { + #[inline] + fn div_assign(&mut self, rhs: &u32) { + self.div_assign(*rhs) + } +} + impl Div for u32 { type Output = UVec3; #[inline] @@ -602,6 +664,30 @@ impl Div for u32 { } } +impl Div<&UVec3> for u32 { + type Output = UVec3; + #[inline] + fn div(self, rhs: &UVec3) -> UVec3 { + self.div(*rhs) + } +} + +impl Div<&UVec3> for &u32 { + type Output = UVec3; + #[inline] + fn div(self, rhs: &UVec3) -> UVec3 { + (*self).div(*rhs) + } +} + +impl Div for &u32 { + type Output = UVec3; + #[inline] + fn div(self, rhs: UVec3) -> UVec3 { + (*self).div(rhs) + } +} + impl Mul for UVec3 { type Output = Self; #[inline] @@ -614,6 +700,30 @@ impl Mul for UVec3 { } } +impl Mul<&UVec3> for UVec3 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: &UVec3) -> UVec3 { + self.mul(*rhs) + } +} + +impl Mul<&UVec3> for &UVec3 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: &UVec3) -> UVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &UVec3 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: UVec3) -> UVec3 { + (*self).mul(rhs) + } +} + impl MulAssign for UVec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -623,6 +733,13 @@ impl MulAssign for UVec3 { } } +impl MulAssign<&Self> for UVec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for UVec3 { type Output = Self; #[inline] @@ -635,6 +752,30 @@ impl Mul for UVec3 { } } +impl Mul<&u32> for UVec3 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: &u32) -> UVec3 { + self.mul(*rhs) + } +} + +impl Mul<&u32> for &UVec3 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: &u32) -> UVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &UVec3 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: u32) -> UVec3 { + (*self).mul(rhs) + } +} + impl MulAssign for UVec3 { #[inline] fn mul_assign(&mut self, rhs: u32) { @@ -644,6 +785,13 @@ impl MulAssign for UVec3 { } } +impl MulAssign<&u32> for UVec3 { + #[inline] + fn mul_assign(&mut self, rhs: &u32) { + self.mul_assign(*rhs) + } +} + impl Mul for u32 { type Output = UVec3; #[inline] @@ -656,6 +804,30 @@ impl Mul for u32 { } } +impl Mul<&UVec3> for u32 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: &UVec3) -> UVec3 { + self.mul(*rhs) + } +} + +impl Mul<&UVec3> for &u32 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: &UVec3) -> UVec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &u32 { + type Output = UVec3; + #[inline] + fn mul(self, rhs: UVec3) -> UVec3 { + (*self).mul(rhs) + } +} + impl Add for UVec3 { type Output = Self; #[inline] @@ -668,6 +840,30 @@ impl Add for UVec3 { } } +impl Add<&UVec3> for UVec3 { + type Output = UVec3; + #[inline] + fn add(self, rhs: &UVec3) -> UVec3 { + self.add(*rhs) + } +} + +impl Add<&UVec3> for &UVec3 { + type Output = UVec3; + #[inline] + fn add(self, rhs: &UVec3) -> UVec3 { + (*self).add(*rhs) + } +} + +impl Add for &UVec3 { + type Output = UVec3; + #[inline] + fn add(self, rhs: UVec3) -> UVec3 { + (*self).add(rhs) + } +} + impl AddAssign for UVec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -677,6 +873,13 @@ impl AddAssign for UVec3 { } } +impl AddAssign<&Self> for UVec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for UVec3 { type Output = Self; #[inline] @@ -689,6 +892,30 @@ impl Add for UVec3 { } } +impl Add<&u32> for UVec3 { + type Output = UVec3; + #[inline] + fn add(self, rhs: &u32) -> UVec3 { + self.add(*rhs) + } +} + +impl Add<&u32> for &UVec3 { + type Output = UVec3; + #[inline] + fn add(self, rhs: &u32) -> UVec3 { + (*self).add(*rhs) + } +} + +impl Add for &UVec3 { + type Output = UVec3; + #[inline] + fn add(self, rhs: u32) -> UVec3 { + (*self).add(rhs) + } +} + impl AddAssign for UVec3 { #[inline] fn add_assign(&mut self, rhs: u32) { @@ -698,6 +925,13 @@ impl AddAssign for UVec3 { } } +impl AddAssign<&u32> for UVec3 { + #[inline] + fn add_assign(&mut self, rhs: &u32) { + self.add_assign(*rhs) + } +} + impl Add for u32 { type Output = UVec3; #[inline] @@ -710,6 +944,30 @@ impl Add for u32 { } } +impl Add<&UVec3> for u32 { + type Output = UVec3; + #[inline] + fn add(self, rhs: &UVec3) -> UVec3 { + self.add(*rhs) + } +} + +impl Add<&UVec3> for &u32 { + type Output = UVec3; + #[inline] + fn add(self, rhs: &UVec3) -> UVec3 { + (*self).add(*rhs) + } +} + +impl Add for &u32 { + type Output = UVec3; + #[inline] + fn add(self, rhs: UVec3) -> UVec3 { + (*self).add(rhs) + } +} + impl Sub for UVec3 { type Output = Self; #[inline] @@ -722,6 +980,30 @@ impl Sub for UVec3 { } } +impl Sub<&UVec3> for UVec3 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: &UVec3) -> UVec3 { + self.sub(*rhs) + } +} + +impl Sub<&UVec3> for &UVec3 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: &UVec3) -> UVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &UVec3 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: UVec3) -> UVec3 { + (*self).sub(rhs) + } +} + impl SubAssign for UVec3 { #[inline] fn sub_assign(&mut self, rhs: UVec3) { @@ -731,6 +1013,13 @@ impl SubAssign for UVec3 { } } +impl SubAssign<&Self> for UVec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for UVec3 { type Output = Self; #[inline] @@ -743,6 +1032,30 @@ impl Sub for UVec3 { } } +impl Sub<&u32> for UVec3 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: &u32) -> UVec3 { + self.sub(*rhs) + } +} + +impl Sub<&u32> for &UVec3 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: &u32) -> UVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &UVec3 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: u32) -> UVec3 { + (*self).sub(rhs) + } +} + impl SubAssign for UVec3 { #[inline] fn sub_assign(&mut self, rhs: u32) { @@ -752,6 +1065,13 @@ impl SubAssign for UVec3 { } } +impl SubAssign<&u32> for UVec3 { + #[inline] + fn sub_assign(&mut self, rhs: &u32) { + self.sub_assign(*rhs) + } +} + impl Sub for u32 { type Output = UVec3; #[inline] @@ -764,6 +1084,30 @@ impl Sub for u32 { } } +impl Sub<&UVec3> for u32 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: &UVec3) -> UVec3 { + self.sub(*rhs) + } +} + +impl Sub<&UVec3> for &u32 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: &UVec3) -> UVec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &u32 { + type Output = UVec3; + #[inline] + fn sub(self, rhs: UVec3) -> UVec3 { + (*self).sub(rhs) + } +} + impl Rem for UVec3 { type Output = Self; #[inline] @@ -776,6 +1120,30 @@ impl Rem for UVec3 { } } +impl Rem<&UVec3> for UVec3 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: &UVec3) -> UVec3 { + self.rem(*rhs) + } +} + +impl Rem<&UVec3> for &UVec3 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: &UVec3) -> UVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &UVec3 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: UVec3) -> UVec3 { + (*self).rem(rhs) + } +} + impl RemAssign for UVec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -785,6 +1153,13 @@ impl RemAssign for UVec3 { } } +impl RemAssign<&Self> for UVec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for UVec3 { type Output = Self; #[inline] @@ -797,6 +1172,30 @@ impl Rem for UVec3 { } } +impl Rem<&u32> for UVec3 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: &u32) -> UVec3 { + self.rem(*rhs) + } +} + +impl Rem<&u32> for &UVec3 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: &u32) -> UVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &UVec3 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: u32) -> UVec3 { + (*self).rem(rhs) + } +} + impl RemAssign for UVec3 { #[inline] fn rem_assign(&mut self, rhs: u32) { @@ -806,6 +1205,13 @@ impl RemAssign for UVec3 { } } +impl RemAssign<&u32> for UVec3 { + #[inline] + fn rem_assign(&mut self, rhs: &u32) { + self.rem_assign(*rhs) + } +} + impl Rem for u32 { type Output = UVec3; #[inline] @@ -818,6 +1224,30 @@ impl Rem for u32 { } } +impl Rem<&UVec3> for u32 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: &UVec3) -> UVec3 { + self.rem(*rhs) + } +} + +impl Rem<&UVec3> for &u32 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: &UVec3) -> UVec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &u32 { + type Output = UVec3; + #[inline] + fn rem(self, rhs: UVec3) -> UVec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u32; 3]> for UVec3 { #[inline] diff --git a/src/u32/uvec4.rs b/src/u32/uvec4.rs index b5bd2986..8634e51b 100644 --- a/src/u32/uvec4.rs +++ b/src/u32/uvec4.rs @@ -591,6 +591,30 @@ impl Div for UVec4 { } } +impl Div<&UVec4> for UVec4 { + type Output = UVec4; + #[inline] + fn div(self, rhs: &UVec4) -> UVec4 { + self.div(*rhs) + } +} + +impl Div<&UVec4> for &UVec4 { + type Output = UVec4; + #[inline] + fn div(self, rhs: &UVec4) -> UVec4 { + (*self).div(*rhs) + } +} + +impl Div for &UVec4 { + type Output = UVec4; + #[inline] + fn div(self, rhs: UVec4) -> UVec4 { + (*self).div(rhs) + } +} + impl DivAssign for UVec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -601,6 +625,13 @@ impl DivAssign for UVec4 { } } +impl DivAssign<&Self> for UVec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for UVec4 { type Output = Self; #[inline] @@ -614,6 +645,30 @@ impl Div for UVec4 { } } +impl Div<&u32> for UVec4 { + type Output = UVec4; + #[inline] + fn div(self, rhs: &u32) -> UVec4 { + self.div(*rhs) + } +} + +impl Div<&u32> for &UVec4 { + type Output = UVec4; + #[inline] + fn div(self, rhs: &u32) -> UVec4 { + (*self).div(*rhs) + } +} + +impl Div for &UVec4 { + type Output = UVec4; + #[inline] + fn div(self, rhs: u32) -> UVec4 { + (*self).div(rhs) + } +} + impl DivAssign for UVec4 { #[inline] fn div_assign(&mut self, rhs: u32) { @@ -624,6 +679,13 @@ impl DivAssign for UVec4 { } } +impl DivAssign<&u32> for UVec4 { + #[inline] + fn div_assign(&mut self, rhs: &u32) { + self.div_assign(*rhs) + } +} + impl Div for u32 { type Output = UVec4; #[inline] @@ -637,6 +699,30 @@ impl Div for u32 { } } +impl Div<&UVec4> for u32 { + type Output = UVec4; + #[inline] + fn div(self, rhs: &UVec4) -> UVec4 { + self.div(*rhs) + } +} + +impl Div<&UVec4> for &u32 { + type Output = UVec4; + #[inline] + fn div(self, rhs: &UVec4) -> UVec4 { + (*self).div(*rhs) + } +} + +impl Div for &u32 { + type Output = UVec4; + #[inline] + fn div(self, rhs: UVec4) -> UVec4 { + (*self).div(rhs) + } +} + impl Mul for UVec4 { type Output = Self; #[inline] @@ -650,6 +736,30 @@ impl Mul for UVec4 { } } +impl Mul<&UVec4> for UVec4 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: &UVec4) -> UVec4 { + self.mul(*rhs) + } +} + +impl Mul<&UVec4> for &UVec4 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: &UVec4) -> UVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &UVec4 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: UVec4) -> UVec4 { + (*self).mul(rhs) + } +} + impl MulAssign for UVec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -660,6 +770,13 @@ impl MulAssign for UVec4 { } } +impl MulAssign<&Self> for UVec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for UVec4 { type Output = Self; #[inline] @@ -673,6 +790,30 @@ impl Mul for UVec4 { } } +impl Mul<&u32> for UVec4 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: &u32) -> UVec4 { + self.mul(*rhs) + } +} + +impl Mul<&u32> for &UVec4 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: &u32) -> UVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &UVec4 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: u32) -> UVec4 { + (*self).mul(rhs) + } +} + impl MulAssign for UVec4 { #[inline] fn mul_assign(&mut self, rhs: u32) { @@ -683,6 +824,13 @@ impl MulAssign for UVec4 { } } +impl MulAssign<&u32> for UVec4 { + #[inline] + fn mul_assign(&mut self, rhs: &u32) { + self.mul_assign(*rhs) + } +} + impl Mul for u32 { type Output = UVec4; #[inline] @@ -696,6 +844,30 @@ impl Mul for u32 { } } +impl Mul<&UVec4> for u32 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: &UVec4) -> UVec4 { + self.mul(*rhs) + } +} + +impl Mul<&UVec4> for &u32 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: &UVec4) -> UVec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &u32 { + type Output = UVec4; + #[inline] + fn mul(self, rhs: UVec4) -> UVec4 { + (*self).mul(rhs) + } +} + impl Add for UVec4 { type Output = Self; #[inline] @@ -709,6 +881,30 @@ impl Add for UVec4 { } } +impl Add<&UVec4> for UVec4 { + type Output = UVec4; + #[inline] + fn add(self, rhs: &UVec4) -> UVec4 { + self.add(*rhs) + } +} + +impl Add<&UVec4> for &UVec4 { + type Output = UVec4; + #[inline] + fn add(self, rhs: &UVec4) -> UVec4 { + (*self).add(*rhs) + } +} + +impl Add for &UVec4 { + type Output = UVec4; + #[inline] + fn add(self, rhs: UVec4) -> UVec4 { + (*self).add(rhs) + } +} + impl AddAssign for UVec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -719,6 +915,13 @@ impl AddAssign for UVec4 { } } +impl AddAssign<&Self> for UVec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for UVec4 { type Output = Self; #[inline] @@ -732,6 +935,30 @@ impl Add for UVec4 { } } +impl Add<&u32> for UVec4 { + type Output = UVec4; + #[inline] + fn add(self, rhs: &u32) -> UVec4 { + self.add(*rhs) + } +} + +impl Add<&u32> for &UVec4 { + type Output = UVec4; + #[inline] + fn add(self, rhs: &u32) -> UVec4 { + (*self).add(*rhs) + } +} + +impl Add for &UVec4 { + type Output = UVec4; + #[inline] + fn add(self, rhs: u32) -> UVec4 { + (*self).add(rhs) + } +} + impl AddAssign for UVec4 { #[inline] fn add_assign(&mut self, rhs: u32) { @@ -742,6 +969,13 @@ impl AddAssign for UVec4 { } } +impl AddAssign<&u32> for UVec4 { + #[inline] + fn add_assign(&mut self, rhs: &u32) { + self.add_assign(*rhs) + } +} + impl Add for u32 { type Output = UVec4; #[inline] @@ -755,6 +989,30 @@ impl Add for u32 { } } +impl Add<&UVec4> for u32 { + type Output = UVec4; + #[inline] + fn add(self, rhs: &UVec4) -> UVec4 { + self.add(*rhs) + } +} + +impl Add<&UVec4> for &u32 { + type Output = UVec4; + #[inline] + fn add(self, rhs: &UVec4) -> UVec4 { + (*self).add(*rhs) + } +} + +impl Add for &u32 { + type Output = UVec4; + #[inline] + fn add(self, rhs: UVec4) -> UVec4 { + (*self).add(rhs) + } +} + impl Sub for UVec4 { type Output = Self; #[inline] @@ -768,6 +1026,30 @@ impl Sub for UVec4 { } } +impl Sub<&UVec4> for UVec4 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: &UVec4) -> UVec4 { + self.sub(*rhs) + } +} + +impl Sub<&UVec4> for &UVec4 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: &UVec4) -> UVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &UVec4 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: UVec4) -> UVec4 { + (*self).sub(rhs) + } +} + impl SubAssign for UVec4 { #[inline] fn sub_assign(&mut self, rhs: UVec4) { @@ -778,6 +1060,13 @@ impl SubAssign for UVec4 { } } +impl SubAssign<&Self> for UVec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for UVec4 { type Output = Self; #[inline] @@ -791,6 +1080,30 @@ impl Sub for UVec4 { } } +impl Sub<&u32> for UVec4 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: &u32) -> UVec4 { + self.sub(*rhs) + } +} + +impl Sub<&u32> for &UVec4 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: &u32) -> UVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &UVec4 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: u32) -> UVec4 { + (*self).sub(rhs) + } +} + impl SubAssign for UVec4 { #[inline] fn sub_assign(&mut self, rhs: u32) { @@ -801,6 +1114,13 @@ impl SubAssign for UVec4 { } } +impl SubAssign<&u32> for UVec4 { + #[inline] + fn sub_assign(&mut self, rhs: &u32) { + self.sub_assign(*rhs) + } +} + impl Sub for u32 { type Output = UVec4; #[inline] @@ -814,6 +1134,30 @@ impl Sub for u32 { } } +impl Sub<&UVec4> for u32 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: &UVec4) -> UVec4 { + self.sub(*rhs) + } +} + +impl Sub<&UVec4> for &u32 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: &UVec4) -> UVec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &u32 { + type Output = UVec4; + #[inline] + fn sub(self, rhs: UVec4) -> UVec4 { + (*self).sub(rhs) + } +} + impl Rem for UVec4 { type Output = Self; #[inline] @@ -827,6 +1171,30 @@ impl Rem for UVec4 { } } +impl Rem<&UVec4> for UVec4 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: &UVec4) -> UVec4 { + self.rem(*rhs) + } +} + +impl Rem<&UVec4> for &UVec4 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: &UVec4) -> UVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &UVec4 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: UVec4) -> UVec4 { + (*self).rem(rhs) + } +} + impl RemAssign for UVec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -837,6 +1205,13 @@ impl RemAssign for UVec4 { } } +impl RemAssign<&Self> for UVec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for UVec4 { type Output = Self; #[inline] @@ -850,6 +1225,30 @@ impl Rem for UVec4 { } } +impl Rem<&u32> for UVec4 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: &u32) -> UVec4 { + self.rem(*rhs) + } +} + +impl Rem<&u32> for &UVec4 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: &u32) -> UVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &UVec4 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: u32) -> UVec4 { + (*self).rem(rhs) + } +} + impl RemAssign for UVec4 { #[inline] fn rem_assign(&mut self, rhs: u32) { @@ -860,6 +1259,13 @@ impl RemAssign for UVec4 { } } +impl RemAssign<&u32> for UVec4 { + #[inline] + fn rem_assign(&mut self, rhs: &u32) { + self.rem_assign(*rhs) + } +} + impl Rem for u32 { type Output = UVec4; #[inline] @@ -873,6 +1279,30 @@ impl Rem for u32 { } } +impl Rem<&UVec4> for u32 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: &UVec4) -> UVec4 { + self.rem(*rhs) + } +} + +impl Rem<&UVec4> for &u32 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: &UVec4) -> UVec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &u32 { + type Output = UVec4; + #[inline] + fn rem(self, rhs: UVec4) -> UVec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u32; 4]> for UVec4 { #[inline] diff --git a/src/u64/u64vec2.rs b/src/u64/u64vec2.rs index ff99a5ad..2d339e2e 100644 --- a/src/u64/u64vec2.rs +++ b/src/u64/u64vec2.rs @@ -494,6 +494,30 @@ impl Div for U64Vec2 { } } +impl Div<&U64Vec2> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: &U64Vec2) -> U64Vec2 { + self.div(*rhs) + } +} + +impl Div<&U64Vec2> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: U64Vec2) -> U64Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for U64Vec2 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -502,6 +526,13 @@ impl DivAssign for U64Vec2 { } } +impl DivAssign<&Self> for U64Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for U64Vec2 { type Output = Self; #[inline] @@ -513,6 +544,30 @@ impl Div for U64Vec2 { } } +impl Div<&u64> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: &u64) -> U64Vec2 { + self.div(*rhs) + } +} + +impl Div<&u64> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: &u64) -> U64Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: u64) -> U64Vec2 { + (*self).div(rhs) + } +} + impl DivAssign for U64Vec2 { #[inline] fn div_assign(&mut self, rhs: u64) { @@ -521,6 +576,13 @@ impl DivAssign for U64Vec2 { } } +impl DivAssign<&u64> for U64Vec2 { + #[inline] + fn div_assign(&mut self, rhs: &u64) { + self.div_assign(*rhs) + } +} + impl Div for u64 { type Output = U64Vec2; #[inline] @@ -532,6 +594,30 @@ impl Div for u64 { } } +impl Div<&U64Vec2> for u64 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: &U64Vec2) -> U64Vec2 { + self.div(*rhs) + } +} + +impl Div<&U64Vec2> for &u64 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).div(*rhs) + } +} + +impl Div for &u64 { + type Output = U64Vec2; + #[inline] + fn div(self, rhs: U64Vec2) -> U64Vec2 { + (*self).div(rhs) + } +} + impl Mul for U64Vec2 { type Output = Self; #[inline] @@ -543,6 +629,30 @@ impl Mul for U64Vec2 { } } +impl Mul<&U64Vec2> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: &U64Vec2) -> U64Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&U64Vec2> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: U64Vec2) -> U64Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for U64Vec2 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -551,6 +661,13 @@ impl MulAssign for U64Vec2 { } } +impl MulAssign<&Self> for U64Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for U64Vec2 { type Output = Self; #[inline] @@ -562,6 +679,30 @@ impl Mul for U64Vec2 { } } +impl Mul<&u64> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: &u64) -> U64Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&u64> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: &u64) -> U64Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: u64) -> U64Vec2 { + (*self).mul(rhs) + } +} + impl MulAssign for U64Vec2 { #[inline] fn mul_assign(&mut self, rhs: u64) { @@ -570,6 +711,13 @@ impl MulAssign for U64Vec2 { } } +impl MulAssign<&u64> for U64Vec2 { + #[inline] + fn mul_assign(&mut self, rhs: &u64) { + self.mul_assign(*rhs) + } +} + impl Mul for u64 { type Output = U64Vec2; #[inline] @@ -581,6 +729,30 @@ impl Mul for u64 { } } +impl Mul<&U64Vec2> for u64 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: &U64Vec2) -> U64Vec2 { + self.mul(*rhs) + } +} + +impl Mul<&U64Vec2> for &u64 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).mul(*rhs) + } +} + +impl Mul for &u64 { + type Output = U64Vec2; + #[inline] + fn mul(self, rhs: U64Vec2) -> U64Vec2 { + (*self).mul(rhs) + } +} + impl Add for U64Vec2 { type Output = Self; #[inline] @@ -592,6 +764,30 @@ impl Add for U64Vec2 { } } +impl Add<&U64Vec2> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: &U64Vec2) -> U64Vec2 { + self.add(*rhs) + } +} + +impl Add<&U64Vec2> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: U64Vec2) -> U64Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for U64Vec2 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -600,6 +796,13 @@ impl AddAssign for U64Vec2 { } } +impl AddAssign<&Self> for U64Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for U64Vec2 { type Output = Self; #[inline] @@ -611,6 +814,30 @@ impl Add for U64Vec2 { } } +impl Add<&u64> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: &u64) -> U64Vec2 { + self.add(*rhs) + } +} + +impl Add<&u64> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: &u64) -> U64Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: u64) -> U64Vec2 { + (*self).add(rhs) + } +} + impl AddAssign for U64Vec2 { #[inline] fn add_assign(&mut self, rhs: u64) { @@ -619,6 +846,13 @@ impl AddAssign for U64Vec2 { } } +impl AddAssign<&u64> for U64Vec2 { + #[inline] + fn add_assign(&mut self, rhs: &u64) { + self.add_assign(*rhs) + } +} + impl Add for u64 { type Output = U64Vec2; #[inline] @@ -630,6 +864,30 @@ impl Add for u64 { } } +impl Add<&U64Vec2> for u64 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: &U64Vec2) -> U64Vec2 { + self.add(*rhs) + } +} + +impl Add<&U64Vec2> for &u64 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).add(*rhs) + } +} + +impl Add for &u64 { + type Output = U64Vec2; + #[inline] + fn add(self, rhs: U64Vec2) -> U64Vec2 { + (*self).add(rhs) + } +} + impl Sub for U64Vec2 { type Output = Self; #[inline] @@ -641,6 +899,30 @@ impl Sub for U64Vec2 { } } +impl Sub<&U64Vec2> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: &U64Vec2) -> U64Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&U64Vec2> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: U64Vec2) -> U64Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for U64Vec2 { #[inline] fn sub_assign(&mut self, rhs: U64Vec2) { @@ -649,6 +931,13 @@ impl SubAssign for U64Vec2 { } } +impl SubAssign<&Self> for U64Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for U64Vec2 { type Output = Self; #[inline] @@ -660,6 +949,30 @@ impl Sub for U64Vec2 { } } +impl Sub<&u64> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: &u64) -> U64Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&u64> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: &u64) -> U64Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: u64) -> U64Vec2 { + (*self).sub(rhs) + } +} + impl SubAssign for U64Vec2 { #[inline] fn sub_assign(&mut self, rhs: u64) { @@ -668,6 +981,13 @@ impl SubAssign for U64Vec2 { } } +impl SubAssign<&u64> for U64Vec2 { + #[inline] + fn sub_assign(&mut self, rhs: &u64) { + self.sub_assign(*rhs) + } +} + impl Sub for u64 { type Output = U64Vec2; #[inline] @@ -679,6 +999,30 @@ impl Sub for u64 { } } +impl Sub<&U64Vec2> for u64 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: &U64Vec2) -> U64Vec2 { + self.sub(*rhs) + } +} + +impl Sub<&U64Vec2> for &u64 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).sub(*rhs) + } +} + +impl Sub for &u64 { + type Output = U64Vec2; + #[inline] + fn sub(self, rhs: U64Vec2) -> U64Vec2 { + (*self).sub(rhs) + } +} + impl Rem for U64Vec2 { type Output = Self; #[inline] @@ -690,6 +1034,30 @@ impl Rem for U64Vec2 { } } +impl Rem<&U64Vec2> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: &U64Vec2) -> U64Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&U64Vec2> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: U64Vec2) -> U64Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for U64Vec2 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -698,6 +1066,13 @@ impl RemAssign for U64Vec2 { } } +impl RemAssign<&Self> for U64Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for U64Vec2 { type Output = Self; #[inline] @@ -709,6 +1084,30 @@ impl Rem for U64Vec2 { } } +impl Rem<&u64> for U64Vec2 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: &u64) -> U64Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&u64> for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: &u64) -> U64Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &U64Vec2 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: u64) -> U64Vec2 { + (*self).rem(rhs) + } +} + impl RemAssign for U64Vec2 { #[inline] fn rem_assign(&mut self, rhs: u64) { @@ -717,6 +1116,13 @@ impl RemAssign for U64Vec2 { } } +impl RemAssign<&u64> for U64Vec2 { + #[inline] + fn rem_assign(&mut self, rhs: &u64) { + self.rem_assign(*rhs) + } +} + impl Rem for u64 { type Output = U64Vec2; #[inline] @@ -728,6 +1134,30 @@ impl Rem for u64 { } } +impl Rem<&U64Vec2> for u64 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: &U64Vec2) -> U64Vec2 { + self.rem(*rhs) + } +} + +impl Rem<&U64Vec2> for &u64 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: &U64Vec2) -> U64Vec2 { + (*self).rem(*rhs) + } +} + +impl Rem for &u64 { + type Output = U64Vec2; + #[inline] + fn rem(self, rhs: U64Vec2) -> U64Vec2 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u64; 2]> for U64Vec2 { #[inline] diff --git a/src/u64/u64vec3.rs b/src/u64/u64vec3.rs index 1a65b876..e5fb91e3 100644 --- a/src/u64/u64vec3.rs +++ b/src/u64/u64vec3.rs @@ -560,6 +560,30 @@ impl Div for U64Vec3 { } } +impl Div<&U64Vec3> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: &U64Vec3) -> U64Vec3 { + self.div(*rhs) + } +} + +impl Div<&U64Vec3> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: U64Vec3) -> U64Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for U64Vec3 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -569,6 +593,13 @@ impl DivAssign for U64Vec3 { } } +impl DivAssign<&Self> for U64Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for U64Vec3 { type Output = Self; #[inline] @@ -581,6 +612,30 @@ impl Div for U64Vec3 { } } +impl Div<&u64> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: &u64) -> U64Vec3 { + self.div(*rhs) + } +} + +impl Div<&u64> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: &u64) -> U64Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: u64) -> U64Vec3 { + (*self).div(rhs) + } +} + impl DivAssign for U64Vec3 { #[inline] fn div_assign(&mut self, rhs: u64) { @@ -590,6 +645,13 @@ impl DivAssign for U64Vec3 { } } +impl DivAssign<&u64> for U64Vec3 { + #[inline] + fn div_assign(&mut self, rhs: &u64) { + self.div_assign(*rhs) + } +} + impl Div for u64 { type Output = U64Vec3; #[inline] @@ -602,6 +664,30 @@ impl Div for u64 { } } +impl Div<&U64Vec3> for u64 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: &U64Vec3) -> U64Vec3 { + self.div(*rhs) + } +} + +impl Div<&U64Vec3> for &u64 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).div(*rhs) + } +} + +impl Div for &u64 { + type Output = U64Vec3; + #[inline] + fn div(self, rhs: U64Vec3) -> U64Vec3 { + (*self).div(rhs) + } +} + impl Mul for U64Vec3 { type Output = Self; #[inline] @@ -614,6 +700,30 @@ impl Mul for U64Vec3 { } } +impl Mul<&U64Vec3> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: &U64Vec3) -> U64Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&U64Vec3> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: U64Vec3) -> U64Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for U64Vec3 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -623,6 +733,13 @@ impl MulAssign for U64Vec3 { } } +impl MulAssign<&Self> for U64Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for U64Vec3 { type Output = Self; #[inline] @@ -635,6 +752,30 @@ impl Mul for U64Vec3 { } } +impl Mul<&u64> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: &u64) -> U64Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&u64> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: &u64) -> U64Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: u64) -> U64Vec3 { + (*self).mul(rhs) + } +} + impl MulAssign for U64Vec3 { #[inline] fn mul_assign(&mut self, rhs: u64) { @@ -644,6 +785,13 @@ impl MulAssign for U64Vec3 { } } +impl MulAssign<&u64> for U64Vec3 { + #[inline] + fn mul_assign(&mut self, rhs: &u64) { + self.mul_assign(*rhs) + } +} + impl Mul for u64 { type Output = U64Vec3; #[inline] @@ -656,6 +804,30 @@ impl Mul for u64 { } } +impl Mul<&U64Vec3> for u64 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: &U64Vec3) -> U64Vec3 { + self.mul(*rhs) + } +} + +impl Mul<&U64Vec3> for &u64 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).mul(*rhs) + } +} + +impl Mul for &u64 { + type Output = U64Vec3; + #[inline] + fn mul(self, rhs: U64Vec3) -> U64Vec3 { + (*self).mul(rhs) + } +} + impl Add for U64Vec3 { type Output = Self; #[inline] @@ -668,6 +840,30 @@ impl Add for U64Vec3 { } } +impl Add<&U64Vec3> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: &U64Vec3) -> U64Vec3 { + self.add(*rhs) + } +} + +impl Add<&U64Vec3> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: U64Vec3) -> U64Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for U64Vec3 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -677,6 +873,13 @@ impl AddAssign for U64Vec3 { } } +impl AddAssign<&Self> for U64Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for U64Vec3 { type Output = Self; #[inline] @@ -689,6 +892,30 @@ impl Add for U64Vec3 { } } +impl Add<&u64> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: &u64) -> U64Vec3 { + self.add(*rhs) + } +} + +impl Add<&u64> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: &u64) -> U64Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: u64) -> U64Vec3 { + (*self).add(rhs) + } +} + impl AddAssign for U64Vec3 { #[inline] fn add_assign(&mut self, rhs: u64) { @@ -698,6 +925,13 @@ impl AddAssign for U64Vec3 { } } +impl AddAssign<&u64> for U64Vec3 { + #[inline] + fn add_assign(&mut self, rhs: &u64) { + self.add_assign(*rhs) + } +} + impl Add for u64 { type Output = U64Vec3; #[inline] @@ -710,6 +944,30 @@ impl Add for u64 { } } +impl Add<&U64Vec3> for u64 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: &U64Vec3) -> U64Vec3 { + self.add(*rhs) + } +} + +impl Add<&U64Vec3> for &u64 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).add(*rhs) + } +} + +impl Add for &u64 { + type Output = U64Vec3; + #[inline] + fn add(self, rhs: U64Vec3) -> U64Vec3 { + (*self).add(rhs) + } +} + impl Sub for U64Vec3 { type Output = Self; #[inline] @@ -722,6 +980,30 @@ impl Sub for U64Vec3 { } } +impl Sub<&U64Vec3> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: &U64Vec3) -> U64Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&U64Vec3> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: U64Vec3) -> U64Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for U64Vec3 { #[inline] fn sub_assign(&mut self, rhs: U64Vec3) { @@ -731,6 +1013,13 @@ impl SubAssign for U64Vec3 { } } +impl SubAssign<&Self> for U64Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for U64Vec3 { type Output = Self; #[inline] @@ -743,6 +1032,30 @@ impl Sub for U64Vec3 { } } +impl Sub<&u64> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: &u64) -> U64Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&u64> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: &u64) -> U64Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: u64) -> U64Vec3 { + (*self).sub(rhs) + } +} + impl SubAssign for U64Vec3 { #[inline] fn sub_assign(&mut self, rhs: u64) { @@ -752,6 +1065,13 @@ impl SubAssign for U64Vec3 { } } +impl SubAssign<&u64> for U64Vec3 { + #[inline] + fn sub_assign(&mut self, rhs: &u64) { + self.sub_assign(*rhs) + } +} + impl Sub for u64 { type Output = U64Vec3; #[inline] @@ -764,6 +1084,30 @@ impl Sub for u64 { } } +impl Sub<&U64Vec3> for u64 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: &U64Vec3) -> U64Vec3 { + self.sub(*rhs) + } +} + +impl Sub<&U64Vec3> for &u64 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).sub(*rhs) + } +} + +impl Sub for &u64 { + type Output = U64Vec3; + #[inline] + fn sub(self, rhs: U64Vec3) -> U64Vec3 { + (*self).sub(rhs) + } +} + impl Rem for U64Vec3 { type Output = Self; #[inline] @@ -776,6 +1120,30 @@ impl Rem for U64Vec3 { } } +impl Rem<&U64Vec3> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: &U64Vec3) -> U64Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&U64Vec3> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: U64Vec3) -> U64Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for U64Vec3 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -785,6 +1153,13 @@ impl RemAssign for U64Vec3 { } } +impl RemAssign<&Self> for U64Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for U64Vec3 { type Output = Self; #[inline] @@ -797,6 +1172,30 @@ impl Rem for U64Vec3 { } } +impl Rem<&u64> for U64Vec3 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: &u64) -> U64Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&u64> for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: &u64) -> U64Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &U64Vec3 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: u64) -> U64Vec3 { + (*self).rem(rhs) + } +} + impl RemAssign for U64Vec3 { #[inline] fn rem_assign(&mut self, rhs: u64) { @@ -806,6 +1205,13 @@ impl RemAssign for U64Vec3 { } } +impl RemAssign<&u64> for U64Vec3 { + #[inline] + fn rem_assign(&mut self, rhs: &u64) { + self.rem_assign(*rhs) + } +} + impl Rem for u64 { type Output = U64Vec3; #[inline] @@ -818,6 +1224,30 @@ impl Rem for u64 { } } +impl Rem<&U64Vec3> for u64 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: &U64Vec3) -> U64Vec3 { + self.rem(*rhs) + } +} + +impl Rem<&U64Vec3> for &u64 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: &U64Vec3) -> U64Vec3 { + (*self).rem(*rhs) + } +} + +impl Rem for &u64 { + type Output = U64Vec3; + #[inline] + fn rem(self, rhs: U64Vec3) -> U64Vec3 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u64; 3]> for U64Vec3 { #[inline] diff --git a/src/u64/u64vec4.rs b/src/u64/u64vec4.rs index 2038d28f..1d161050 100644 --- a/src/u64/u64vec4.rs +++ b/src/u64/u64vec4.rs @@ -591,6 +591,30 @@ impl Div for U64Vec4 { } } +impl Div<&U64Vec4> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: &U64Vec4) -> U64Vec4 { + self.div(*rhs) + } +} + +impl Div<&U64Vec4> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: U64Vec4) -> U64Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for U64Vec4 { #[inline] fn div_assign(&mut self, rhs: Self) { @@ -601,6 +625,13 @@ impl DivAssign for U64Vec4 { } } +impl DivAssign<&Self> for U64Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &Self) { + self.div_assign(*rhs) + } +} + impl Div for U64Vec4 { type Output = Self; #[inline] @@ -614,6 +645,30 @@ impl Div for U64Vec4 { } } +impl Div<&u64> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: &u64) -> U64Vec4 { + self.div(*rhs) + } +} + +impl Div<&u64> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: &u64) -> U64Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: u64) -> U64Vec4 { + (*self).div(rhs) + } +} + impl DivAssign for U64Vec4 { #[inline] fn div_assign(&mut self, rhs: u64) { @@ -624,6 +679,13 @@ impl DivAssign for U64Vec4 { } } +impl DivAssign<&u64> for U64Vec4 { + #[inline] + fn div_assign(&mut self, rhs: &u64) { + self.div_assign(*rhs) + } +} + impl Div for u64 { type Output = U64Vec4; #[inline] @@ -637,6 +699,30 @@ impl Div for u64 { } } +impl Div<&U64Vec4> for u64 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: &U64Vec4) -> U64Vec4 { + self.div(*rhs) + } +} + +impl Div<&U64Vec4> for &u64 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).div(*rhs) + } +} + +impl Div for &u64 { + type Output = U64Vec4; + #[inline] + fn div(self, rhs: U64Vec4) -> U64Vec4 { + (*self).div(rhs) + } +} + impl Mul for U64Vec4 { type Output = Self; #[inline] @@ -650,6 +736,30 @@ impl Mul for U64Vec4 { } } +impl Mul<&U64Vec4> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: &U64Vec4) -> U64Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&U64Vec4> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: U64Vec4) -> U64Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for U64Vec4 { #[inline] fn mul_assign(&mut self, rhs: Self) { @@ -660,6 +770,13 @@ impl MulAssign for U64Vec4 { } } +impl MulAssign<&Self> for U64Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &Self) { + self.mul_assign(*rhs) + } +} + impl Mul for U64Vec4 { type Output = Self; #[inline] @@ -673,6 +790,30 @@ impl Mul for U64Vec4 { } } +impl Mul<&u64> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: &u64) -> U64Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&u64> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: &u64) -> U64Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: u64) -> U64Vec4 { + (*self).mul(rhs) + } +} + impl MulAssign for U64Vec4 { #[inline] fn mul_assign(&mut self, rhs: u64) { @@ -683,6 +824,13 @@ impl MulAssign for U64Vec4 { } } +impl MulAssign<&u64> for U64Vec4 { + #[inline] + fn mul_assign(&mut self, rhs: &u64) { + self.mul_assign(*rhs) + } +} + impl Mul for u64 { type Output = U64Vec4; #[inline] @@ -696,6 +844,30 @@ impl Mul for u64 { } } +impl Mul<&U64Vec4> for u64 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: &U64Vec4) -> U64Vec4 { + self.mul(*rhs) + } +} + +impl Mul<&U64Vec4> for &u64 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).mul(*rhs) + } +} + +impl Mul for &u64 { + type Output = U64Vec4; + #[inline] + fn mul(self, rhs: U64Vec4) -> U64Vec4 { + (*self).mul(rhs) + } +} + impl Add for U64Vec4 { type Output = Self; #[inline] @@ -709,6 +881,30 @@ impl Add for U64Vec4 { } } +impl Add<&U64Vec4> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: &U64Vec4) -> U64Vec4 { + self.add(*rhs) + } +} + +impl Add<&U64Vec4> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: U64Vec4) -> U64Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for U64Vec4 { #[inline] fn add_assign(&mut self, rhs: Self) { @@ -719,6 +915,13 @@ impl AddAssign for U64Vec4 { } } +impl AddAssign<&Self> for U64Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &Self) { + self.add_assign(*rhs) + } +} + impl Add for U64Vec4 { type Output = Self; #[inline] @@ -732,6 +935,30 @@ impl Add for U64Vec4 { } } +impl Add<&u64> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: &u64) -> U64Vec4 { + self.add(*rhs) + } +} + +impl Add<&u64> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: &u64) -> U64Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: u64) -> U64Vec4 { + (*self).add(rhs) + } +} + impl AddAssign for U64Vec4 { #[inline] fn add_assign(&mut self, rhs: u64) { @@ -742,6 +969,13 @@ impl AddAssign for U64Vec4 { } } +impl AddAssign<&u64> for U64Vec4 { + #[inline] + fn add_assign(&mut self, rhs: &u64) { + self.add_assign(*rhs) + } +} + impl Add for u64 { type Output = U64Vec4; #[inline] @@ -755,6 +989,30 @@ impl Add for u64 { } } +impl Add<&U64Vec4> for u64 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: &U64Vec4) -> U64Vec4 { + self.add(*rhs) + } +} + +impl Add<&U64Vec4> for &u64 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).add(*rhs) + } +} + +impl Add for &u64 { + type Output = U64Vec4; + #[inline] + fn add(self, rhs: U64Vec4) -> U64Vec4 { + (*self).add(rhs) + } +} + impl Sub for U64Vec4 { type Output = Self; #[inline] @@ -768,6 +1026,30 @@ impl Sub for U64Vec4 { } } +impl Sub<&U64Vec4> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: &U64Vec4) -> U64Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&U64Vec4> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: U64Vec4) -> U64Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for U64Vec4 { #[inline] fn sub_assign(&mut self, rhs: U64Vec4) { @@ -778,6 +1060,13 @@ impl SubAssign for U64Vec4 { } } +impl SubAssign<&Self> for U64Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &Self) { + self.sub_assign(*rhs) + } +} + impl Sub for U64Vec4 { type Output = Self; #[inline] @@ -791,6 +1080,30 @@ impl Sub for U64Vec4 { } } +impl Sub<&u64> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: &u64) -> U64Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&u64> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: &u64) -> U64Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: u64) -> U64Vec4 { + (*self).sub(rhs) + } +} + impl SubAssign for U64Vec4 { #[inline] fn sub_assign(&mut self, rhs: u64) { @@ -801,6 +1114,13 @@ impl SubAssign for U64Vec4 { } } +impl SubAssign<&u64> for U64Vec4 { + #[inline] + fn sub_assign(&mut self, rhs: &u64) { + self.sub_assign(*rhs) + } +} + impl Sub for u64 { type Output = U64Vec4; #[inline] @@ -814,6 +1134,30 @@ impl Sub for u64 { } } +impl Sub<&U64Vec4> for u64 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: &U64Vec4) -> U64Vec4 { + self.sub(*rhs) + } +} + +impl Sub<&U64Vec4> for &u64 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).sub(*rhs) + } +} + +impl Sub for &u64 { + type Output = U64Vec4; + #[inline] + fn sub(self, rhs: U64Vec4) -> U64Vec4 { + (*self).sub(rhs) + } +} + impl Rem for U64Vec4 { type Output = Self; #[inline] @@ -827,6 +1171,30 @@ impl Rem for U64Vec4 { } } +impl Rem<&U64Vec4> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: &U64Vec4) -> U64Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&U64Vec4> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: U64Vec4) -> U64Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for U64Vec4 { #[inline] fn rem_assign(&mut self, rhs: Self) { @@ -837,6 +1205,13 @@ impl RemAssign for U64Vec4 { } } +impl RemAssign<&Self> for U64Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &Self) { + self.rem_assign(*rhs) + } +} + impl Rem for U64Vec4 { type Output = Self; #[inline] @@ -850,6 +1225,30 @@ impl Rem for U64Vec4 { } } +impl Rem<&u64> for U64Vec4 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: &u64) -> U64Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&u64> for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: &u64) -> U64Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &U64Vec4 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: u64) -> U64Vec4 { + (*self).rem(rhs) + } +} + impl RemAssign for U64Vec4 { #[inline] fn rem_assign(&mut self, rhs: u64) { @@ -860,6 +1259,13 @@ impl RemAssign for U64Vec4 { } } +impl RemAssign<&u64> for U64Vec4 { + #[inline] + fn rem_assign(&mut self, rhs: &u64) { + self.rem_assign(*rhs) + } +} + impl Rem for u64 { type Output = U64Vec4; #[inline] @@ -873,6 +1279,30 @@ impl Rem for u64 { } } +impl Rem<&U64Vec4> for u64 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: &U64Vec4) -> U64Vec4 { + self.rem(*rhs) + } +} + +impl Rem<&U64Vec4> for &u64 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: &U64Vec4) -> U64Vec4 { + (*self).rem(*rhs) + } +} + +impl Rem for &u64 { + type Output = U64Vec4; + #[inline] + fn rem(self, rhs: U64Vec4) -> U64Vec4 { + (*self).rem(rhs) + } +} + #[cfg(not(target_arch = "spirv"))] impl AsRef<[u64; 4]> for U64Vec4 { #[inline] diff --git a/tests/vec2.rs b/tests/vec2.rs index 197d338d..c7b7185e 100644 --- a/tests/vec2.rs +++ b/tests/vec2.rs @@ -152,6 +152,62 @@ macro_rules! impl_vec2_tests { assert_eq!($new(2 as $t, 4 as $t), a % 8 as $t); }); + glam_test!(test_ops_propagated, { + let vec = $new(2 as $t, 4 as $t); + let scalar = 2 as $t; + let g_scalar = 16 as $t; + + assert_eq!((vec + vec), (vec + &vec)); + assert_eq!((vec + vec), (&vec + vec)); + assert_eq!((vec + vec), (&vec + &vec)); + assert_eq!((vec + scalar), (vec + &scalar)); + assert_eq!((vec + scalar), (&vec + &scalar)); + assert_eq!((vec + scalar), (&vec + scalar)); + assert_eq!((scalar + vec), (&scalar + vec)); + assert_eq!((scalar + vec), (&scalar + &vec)); + assert_eq!((scalar + vec), (scalar + &vec)); + + assert_eq!((vec - vec), (vec - &vec)); + assert_eq!((vec - vec), (&vec - vec)); + assert_eq!((vec - vec), (&vec - &vec)); + assert_eq!((vec - scalar), (vec - &scalar)); + assert_eq!((vec - scalar), (&vec - &scalar)); + assert_eq!((vec - scalar), (&vec - scalar)); + assert_eq!((g_scalar - vec), (&g_scalar - vec)); + assert_eq!((g_scalar - vec), (&g_scalar - &vec)); + assert_eq!((g_scalar - vec), (g_scalar - &vec)); + + assert_eq!((vec * vec), (vec * &vec)); + assert_eq!((vec * vec), (&vec * vec)); + assert_eq!((vec * vec), (&vec * &vec)); + assert_eq!((vec * scalar), (vec * &scalar)); + assert_eq!((vec * scalar), (&vec * &scalar)); + assert_eq!((vec * scalar), (&vec * scalar)); + assert_eq!((scalar * vec), (&scalar * vec)); + assert_eq!((scalar * vec), (&scalar * &vec)); + assert_eq!((scalar * vec), (scalar * &vec)); + + assert_eq!((vec / vec), (vec / &vec)); + assert_eq!((vec / vec), (&vec / vec)); + assert_eq!((vec / vec), (&vec / &vec)); + assert_eq!((vec / scalar), (vec / &scalar)); + assert_eq!((vec / scalar), (&vec / &scalar)); + assert_eq!((vec / scalar), (&vec / scalar)); + assert_eq!((scalar / vec), (&scalar / vec)); + assert_eq!((scalar / vec), (&scalar / &vec)); + assert_eq!((scalar / vec), (scalar / &vec)); + + assert_eq!((vec % vec), (vec % &vec)); + assert_eq!((vec % vec), (&vec % vec)); + assert_eq!((vec % vec), (&vec % &vec)); + assert_eq!((vec % scalar), (vec % &scalar)); + assert_eq!((vec % scalar), (&vec % &scalar)); + assert_eq!((vec % scalar), (&vec % scalar)); + assert_eq!((scalar % vec), (&scalar % vec)); + assert_eq!((scalar % vec), (&scalar % &vec)); + assert_eq!((scalar % vec), (scalar % &vec)); + }); + glam_test!(test_assign_ops, { let a = $new(1 as $t, 2 as $t); let mut b = a; @@ -186,6 +242,47 @@ macro_rules! impl_vec2_tests { assert_eq!($new(0 as $t, 0 as $t), b); }); + glam_test!(test_assign_ops_propagation, { + let vec = $new(1 as $t, 2 as $t); + let mut a = vec; + let mut b = vec; + let scalar = 2 as $t; + + a += &scalar; + b += scalar; + assert_eq!(b, a, "AddAssign"); + a -= &scalar; + b -= scalar; + assert_eq!(b, a, "SubAssign"); + a *= &scalar; + b *= scalar; + assert_eq!(b, a, "MulAssign"); + a /= &scalar; + b /= scalar; + assert_eq!(b, a, "DivAssign"); + a %= &scalar; + b %= scalar; + assert_eq!(b, a, "MulAssign"); + + a = vec; + b = vec; + a += &vec; + b += vec; + assert_eq!(b, a, "AddAssign"); + a -= &vec; + b -= vec; + assert_eq!(b, a, "SubAssign"); + a *= &vec; + b *= vec; + assert_eq!(b, a, "MulAssign"); + a /= &vec; + b /= vec; + assert_eq!(b, a, "DivAssign"); + a %= &vec; + b %= vec; + assert_eq!(b, a, "RemAssign"); + }); + glam_test!(test_min_max, { let a = $new(0 as $t, 2 as $t); let b = $new(1 as $t, 1 as $t); @@ -577,6 +674,11 @@ macro_rules! impl_vec2_signed_tests { assert_eq!($new(0.0 as $t, -0.0 as $t), -$new(-0.0 as $t, 0.0 as $t)); }); + glam_test!(test_neg_propagation, { + let a = $new(1 as $t, 2 as $t); + assert_eq!(-a, -(&a)); + }); + glam_test!(test_perp, { let v1 = $vec2::new(1 as $t, 2 as $t); let v2 = $vec2::new(1 as $t, 1 as $t); diff --git a/tests/vec3.rs b/tests/vec3.rs index 4957d5a3..567690a7 100644 --- a/tests/vec3.rs +++ b/tests/vec3.rs @@ -189,6 +189,62 @@ macro_rules! impl_vec3_tests { assert_eq!($new(2 as $t, 4 as $t, 0 as $t), a % 8 as $t); }); + glam_test!(test_ops_propagated, { + let vec = $new(2 as $t, 4 as $t, 8 as $t); + let scalar = 2 as $t; + let g_scalar = 16 as $t; + + assert_eq!((vec + vec), (vec + &vec)); + assert_eq!((vec + vec), (&vec + vec)); + assert_eq!((vec + vec), (&vec + &vec)); + assert_eq!((vec + scalar), (vec + &scalar)); + assert_eq!((vec + scalar), (&vec + &scalar)); + assert_eq!((vec + scalar), (&vec + scalar)); + assert_eq!((scalar + vec), (&scalar + vec)); + assert_eq!((scalar + vec), (&scalar + &vec)); + assert_eq!((scalar + vec), (scalar + &vec)); + + assert_eq!((vec - vec), (vec - &vec)); + assert_eq!((vec - vec), (&vec - vec)); + assert_eq!((vec - vec), (&vec - &vec)); + assert_eq!((vec - scalar), (vec - &scalar)); + assert_eq!((vec - scalar), (&vec - &scalar)); + assert_eq!((vec - scalar), (&vec - scalar)); + assert_eq!((g_scalar - vec), (&g_scalar - vec)); + assert_eq!((g_scalar - vec), (&g_scalar - &vec)); + assert_eq!((g_scalar - vec), (g_scalar - &vec)); + + assert_eq!((vec * vec), (vec * &vec)); + assert_eq!((vec * vec), (&vec * vec)); + assert_eq!((vec * vec), (&vec * &vec)); + assert_eq!((vec * scalar), (vec * &scalar)); + assert_eq!((vec * scalar), (&vec * &scalar)); + assert_eq!((vec * scalar), (&vec * scalar)); + assert_eq!((scalar * vec), (&scalar * vec)); + assert_eq!((scalar * vec), (&scalar * &vec)); + assert_eq!((scalar * vec), (scalar * &vec)); + + assert_eq!((vec / vec), (vec / &vec)); + assert_eq!((vec / vec), (&vec / vec)); + assert_eq!((vec / vec), (&vec / &vec)); + assert_eq!((vec / scalar), (vec / &scalar)); + assert_eq!((vec / scalar), (&vec / &scalar)); + assert_eq!((vec / scalar), (&vec / scalar)); + assert_eq!((scalar / vec), (&scalar / vec)); + assert_eq!((scalar / vec), (&scalar / &vec)); + assert_eq!((scalar / vec), (scalar / &vec)); + + assert_eq!((vec % vec), (vec % &vec)); + assert_eq!((vec % vec), (&vec % vec)); + assert_eq!((vec % vec), (&vec % &vec)); + assert_eq!((vec % scalar), (vec % &scalar)); + assert_eq!((vec % scalar), (&vec % &scalar)); + assert_eq!((vec % scalar), (&vec % scalar)); + assert_eq!((scalar % vec), (&scalar % vec)); + assert_eq!((scalar % vec), (&scalar % &vec)); + assert_eq!((scalar % vec), (scalar % &vec)); + }); + glam_test!(test_assign_ops, { let a = $new(1 as $t, 2 as $t, 3 as $t); let mut b = a; @@ -223,6 +279,47 @@ macro_rules! impl_vec3_tests { assert_eq!($new(0 as $t, 0 as $t, 0 as $t), b); }); + glam_test!(test_assign_ops_propagation, { + let vec = $new(1 as $t, 2 as $t, 3 as $t); + let mut a = vec; + let mut b = vec; + let scalar = 2 as $t; + + a += &scalar; + b += scalar; + assert_eq!(b, a, "AddAssign"); + a -= &scalar; + b -= scalar; + assert_eq!(b, a, "SubAssign"); + a *= &scalar; + b *= scalar; + assert_eq!(b, a, "MulAssign"); + a /= &scalar; + b /= scalar; + assert_eq!(b, a, "DivAssign"); + a %= &scalar; + b %= scalar; + assert_eq!(b, a, "MulAssign"); + + a = vec; + b = vec; + a += &vec; + b += vec; + assert_eq!(b, a, "AddAssign"); + a -= &vec; + b -= vec; + assert_eq!(b, a, "SubAssign"); + a *= &vec; + b *= vec; + assert_eq!(b, a, "MulAssign"); + a /= &vec; + b /= vec; + assert_eq!(b, a, "DivAssign"); + a %= &vec; + b %= vec; + assert_eq!(b, a, "RemAssign"); + }); + glam_test!(test_min_max, { let a = $new(3 as $t, 5 as $t, 1 as $t); let b = $new(4 as $t, 2 as $t, 6 as $t); @@ -656,6 +753,11 @@ macro_rules! impl_vec3_signed_tests { ); }); + glam_test!(test_neg_propagation, { + let a = $new(1 as $t, 2 as $t, 3 as $t); + assert_eq!(-a, -(&a)); + }); + glam_test!(test_is_negative_bitmask, { assert_eq!($vec3::ZERO.is_negative_bitmask(), 0b000); assert_eq!($vec3::ONE.is_negative_bitmask(), 0b000); diff --git a/tests/vec4.rs b/tests/vec4.rs index 21626a4c..4bb01e43 100644 --- a/tests/vec4.rs +++ b/tests/vec4.rs @@ -239,6 +239,62 @@ macro_rules! impl_vec4_tests { assert_eq!($new(2 as $t, 4 as $t, 0 as $t, 0 as $t), a % 8 as $t); }); + glam_test!(test_ops_propagated, { + let vec = $new(2 as $t, 4 as $t, 8 as $t, 16 as $t); + let scalar = 2 as $t; + let g_scalar = 16 as $t; + + assert_eq!((vec + vec), (vec + &vec)); + assert_eq!((vec + vec), (&vec + vec)); + assert_eq!((vec + vec), (&vec + &vec)); + assert_eq!((vec + scalar), (vec + &scalar)); + assert_eq!((vec + scalar), (&vec + &scalar)); + assert_eq!((vec + scalar), (&vec + scalar)); + assert_eq!((scalar + vec), (&scalar + vec)); + assert_eq!((scalar + vec), (&scalar + &vec)); + assert_eq!((scalar + vec), (scalar + &vec)); + + assert_eq!((vec - vec), (vec - &vec)); + assert_eq!((vec - vec), (&vec - vec)); + assert_eq!((vec - vec), (&vec - &vec)); + assert_eq!((vec - scalar), (vec - &scalar)); + assert_eq!((vec - scalar), (&vec - &scalar)); + assert_eq!((vec - scalar), (&vec - scalar)); + assert_eq!((g_scalar - vec), (&g_scalar - vec)); + assert_eq!((g_scalar - vec), (&g_scalar - &vec)); + assert_eq!((g_scalar - vec), (g_scalar - &vec)); + + assert_eq!((vec * vec), (vec * &vec)); + assert_eq!((vec * vec), (&vec * vec)); + assert_eq!((vec * vec), (&vec * &vec)); + assert_eq!((vec * scalar), (vec * &scalar)); + assert_eq!((vec * scalar), (&vec * &scalar)); + assert_eq!((vec * scalar), (&vec * scalar)); + assert_eq!((scalar * vec), (&scalar * vec)); + assert_eq!((scalar * vec), (&scalar * &vec)); + assert_eq!((scalar * vec), (scalar * &vec)); + + assert_eq!((vec / vec), (vec / &vec)); + assert_eq!((vec / vec), (&vec / vec)); + assert_eq!((vec / vec), (&vec / &vec)); + assert_eq!((vec / scalar), (vec / &scalar)); + assert_eq!((vec / scalar), (&vec / &scalar)); + assert_eq!((vec / scalar), (&vec / scalar)); + assert_eq!((scalar / vec), (&scalar / vec)); + assert_eq!((scalar / vec), (&scalar / &vec)); + assert_eq!((scalar / vec), (scalar / &vec)); + + assert_eq!((vec % vec), (vec % &vec)); + assert_eq!((vec % vec), (&vec % vec)); + assert_eq!((vec % vec), (&vec % &vec)); + assert_eq!((vec % scalar), (vec % &scalar)); + assert_eq!((vec % scalar), (&vec % &scalar)); + assert_eq!((vec % scalar), (&vec % scalar)); + assert_eq!((scalar % vec), (&scalar % vec)); + assert_eq!((scalar % vec), (&scalar % &vec)); + assert_eq!((scalar % vec), (scalar % &vec)); + }); + glam_test!(test_assign_ops, { let a = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t); let mut b = a; @@ -273,6 +329,47 @@ macro_rules! impl_vec4_tests { assert_eq!($new(0 as $t, 0 as $t, 0 as $t, 0 as $t), b); }); + glam_test!(test_assign_ops_propagation, { + let vec = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t); + let mut a = vec; + let mut b = vec; + let scalar = 2 as $t; + + a += &scalar; + b += scalar; + assert_eq!(b, a, "AddAssign"); + a -= &scalar; + b -= scalar; + assert_eq!(b, a, "SubAssign"); + a *= &scalar; + b *= scalar; + assert_eq!(b, a, "MulAssign"); + a /= &scalar; + b /= scalar; + assert_eq!(b, a, "DivAssign"); + a %= &scalar; + b %= scalar; + assert_eq!(b, a, "MulAssign"); + + a = vec; + b = vec; + a += &vec; + b += vec; + assert_eq!(b, a, "AddAssign"); + a -= &vec; + b -= vec; + assert_eq!(b, a, "SubAssign"); + a *= &vec; + b *= vec; + assert_eq!(b, a, "MulAssign"); + a /= &vec; + b /= vec; + assert_eq!(b, a, "DivAssign"); + a %= &vec; + b %= vec; + assert_eq!(b, a, "RemAssign"); + }); + glam_test!(test_min_max, { let a = $new(4 as $t, 6 as $t, 2 as $t, 8 as $t); let b = $new(5 as $t, 3 as $t, 7 as $t, 1 as $t); @@ -772,6 +869,11 @@ macro_rules! impl_vec4_signed_tests { ); }); + glam_test!(test_neg_propagation, { + let a = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t); + assert_eq!(-a, -(&a)); + }); + glam_test!(test_is_negative_bitmask, { assert_eq!($vec4::ZERO.is_negative_bitmask(), 0b0000); assert_eq!($vec4::ONE.is_negative_bitmask(), 0b0000);