File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11[package ]
22
33name = " piston-float"
4- version = " 0.0.0 "
4+ version = " 0.0.1 "
55authors = [" bvssvni <bvssvni@gmail.com>" ]
66keywords = [" float" , " piston" ]
77description = " Traits for generic floats in game development"
Original file line number Diff line number Diff line change @@ -272,14 +272,20 @@ pub trait FromPrimitive {
272272}
273273
274274impl FromPrimitive for f64 {
275+ #[ inline( always) ]
275276 fn from_f64 ( t : f64 ) -> Self { t }
277+ #[ inline( always) ]
276278 fn from_f32 ( t : f32 ) -> Self { t as f64 }
279+ #[ inline( always) ]
277280 fn from_isize ( t : isize ) -> Self { t as f64 }
278281}
279282
280283impl FromPrimitive for f32 {
284+ #[ inline( always) ]
281285 fn from_f64 ( t : f64 ) -> Self { t as f32 }
286+ #[ inline( always) ]
282287 fn from_f32 ( t : f32 ) -> Self { t }
288+ #[ inline( always) ]
283289 fn from_isize ( t : isize ) -> Self { t as f32 }
284290}
285291
You can’t perform that action at this time.
0 commit comments