I just wanted to ask why there’s no “truncating” label when converting say Float to Int:
let foo: Float = 1.9
let bar = Int(foo)
I do Swift tutoring on the side and the fact that “bar” equals to 1 always surprises my students.
From the Swift API Guidelines:
In “narrowing” type conversions, though, a label that describes the narrowing is recommended.
So, why there’s no “truncating” label in this case?