Both of these types of casting work with
Edit
(as written by Nate Cook, this is not a real type of Casting, the Swift type is executed with a keyword as. In the next call, I initialize Int64 with the Float parameter.)
anInt = Int64(aFloat)
anInt = (Int64)(aFloat)
First
var anInt : Int64 = 0
var aFloat : Float = 11.5
anInt = Int64(aFloat)
println(anInt)
Second
var anInt : Int64 = 0
var aFloat : Float = 11.5
anInt = (Int64)(aFloat)
println(anInt)
In the second example, the main difference is that there are parentheses around the Int64 type, but I did not find any information about this syntax in the documents.
The statement Int64(aFloat)is a typical initializer call that creates an Int64, passing Float as initialization parameters. Is it correct?
What is the meaning of brackets in (Int64)(aFloat)? For better readability or is there another meaning? Thanks