3 ms·
> No mention of how you would remember that `f64` is the default floating point type While the default is `f64`, it's only used if the type can't be inferred o
by conradev 9y ago
> No mention of how you would remember that `f64` is the default floating point type
While the default is `f64`, it's only used if the type can't be inferred otherwise.
If the author had changed the `f64` in the code sample to `f32`, type inference would have made the float literal to be an `f32` to match.
That is a little complicated to explain, but the UX is such that literals generally "just work".