@@ -45,6 +45,7 @@ struct JointMotor {
45
45
#[ reflect( ignore) ]
46
46
pub max_force : Vec3 ,
47
47
}
48
+ type LimitsFun = fn ( & JointLimits < f32 > ) -> f32 ;
48
49
impl JointMotor {
49
50
fn from_linear ( joint : & GenericJoint ) -> Option < Self > {
50
51
let mk_vec3 = |f : fn ( & RapierJointMotor ) -> f32 | {
@@ -54,7 +55,7 @@ impl JointMotor {
54
55
z : f ( joint. motor ( JointAxis :: Z ) ?) ,
55
56
} )
56
57
} ;
57
- let mk_vec3_limit = |f : fn ( & JointLimits < f32 > ) -> f32 | Vec3 {
58
+ let mk_vec3_limit = |f : LimitsFun | Vec3 {
58
59
x : joint. limits ( JointAxis :: X ) . map_or ( 0. , f) ,
59
60
y : joint. limits ( JointAxis :: Y ) . map_or ( 0. , f) ,
60
61
z : joint. limits ( JointAxis :: Z ) . map_or ( 0. , f) ,
@@ -89,7 +90,7 @@ impl JointMotor {
89
90
z : f ( joint. motor ( JointAxis :: AngZ ) ?) ,
90
91
} )
91
92
} ;
92
- let mk_vec3_limit = |f : fn ( & JointLimits < f32 > ) -> f32 | Vec3 {
93
+ let mk_vec3_limit = |f : LimitsFun | Vec3 {
93
94
x : joint. limits ( JointAxis :: AngX ) . map_or ( 0. , f) ,
94
95
y : joint. limits ( JointAxis :: AngY ) . map_or ( 0. , f) ,
95
96
z : joint. limits ( JointAxis :: AngZ ) . map_or ( 0. , f) ,
0 commit comments