@@ -1113,14 +1113,16 @@ impl<T> Mul<T> for Vector3<T>
1113
1113
}
1114
1114
}
1115
1115
1116
- impl Div < Float > for Vector3f
1116
+ // work around bug
1117
+ // https://github.com/rust-lang/rust/issues/40395
1118
+ impl Div < Float > for Vector3 < f32 >
1117
1119
{
1118
- type Output = Vector3f ;
1119
- fn div ( self , rhs : Float ) -> Vector3f
1120
+ type Output = Vector3 < f32 > ;
1121
+ fn div ( self , rhs : Float ) -> Vector3 < f32 >
1120
1122
{
1121
1123
assert_ne ! ( rhs, 0.0 as Float ) ;
1122
1124
let inv: Float = 1.0 as Float / rhs;
1123
- Vector3f {
1125
+ Vector3 :: < f32 > {
1124
1126
x : self . x * inv,
1125
1127
y : self . y * inv,
1126
1128
z : self . z * inv,
@@ -1532,22 +1534,26 @@ impl<T> MulAssign<T> for Point3<T>
1532
1534
}
1533
1535
}
1534
1536
1535
- impl Div < Float > for Point3f
1537
+ // work around bug
1538
+ // https://github.com/rust-lang/rust/issues/40395
1539
+ impl Div < Float > for Point3 < f32 >
1536
1540
{
1537
- type Output = Point3f ;
1538
- fn div ( self , rhs : Float ) -> Point3f
1541
+ type Output = Point3 < f32 > ;
1542
+ fn div ( self , rhs : Float ) -> Point3 < f32 >
1539
1543
{
1540
1544
assert_ne ! ( rhs, 0.0 as Float ) ;
1541
1545
let inv: Float = 1.0 as Float / rhs;
1542
- Point3f {
1546
+ Point3 :: < f32 > {
1543
1547
x : self . x * inv,
1544
1548
y : self . y * inv,
1545
1549
z : self . z * inv,
1546
1550
}
1547
1551
}
1548
1552
}
1549
1553
1550
- impl DivAssign < Float > for Point3f
1554
+ // work around bug
1555
+ // https://github.com/rust-lang/rust/issues/40395
1556
+ impl DivAssign < Float > for Point3 < f32 >
1551
1557
{
1552
1558
fn div_assign ( & mut self , rhs : Float ) {
1553
1559
assert_ne ! ( rhs, 0.0 as Float ) ;
0 commit comments