File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
gdnative-core/src/core_types/geom Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
- use std:: ops:: Mul ;
1
+ use std:: ops:: { Mul , MulAssign } ;
2
2
3
3
use crate :: core_types:: { Basis , Vector3 } ;
4
4
@@ -295,12 +295,18 @@ impl Transform {
295
295
296
296
impl Mul < Transform > for Transform {
297
297
type Output = Transform ;
298
+ #[ inline]
299
+ fn mul ( mut self , rhs : Self ) -> Self :: Output {
300
+ self *= rhs;
301
+ self
302
+ }
303
+ }
298
304
305
+ impl MulAssign < Transform > for Transform {
299
306
#[ inline]
300
- fn mul ( self , rhs : Self ) -> Self :: Output {
301
- let origin = self . xform ( rhs. origin ) ;
302
- let basis = self . basis * rhs. basis ;
303
- Self { origin, basis }
307
+ fn mul_assign ( & mut self , rhs : Self ) {
308
+ self . origin = self . xform ( rhs. origin ) ;
309
+ self . basis = self . basis * rhs. basis ;
304
310
}
305
311
}
306
312
You can’t perform that action at this time.
0 commit comments