Use sin, cos, sqrt with type inference

2.0.sqrt() doest not work, only 2.0f32.sqrt() does. Its not convenient.
I think, its because sqrt() is a separated method of f32 and f64, not a common traint method, so type inference does not work here. Why did it implemented such way?

I couldn't say, but here's an issue about it.

2 Likes