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 } ;
22
33use crate :: core_types:: { Basis , Vector3 } ;
44
@@ -295,12 +295,18 @@ impl Transform {
295295
296296impl Mul < Transform > for Transform {
297297 type Output = Transform ;
298+ #[ inline]
299+ fn mul ( mut self , rhs : Self ) -> Self :: Output {
300+ self *= rhs;
301+ self
302+ }
303+ }
298304
305+ impl MulAssign < Transform > for Transform {
299306 #[ 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 ;
304310 }
305311}
306312
You can’t perform that action at this time.
0 commit comments