I want to convert a Float to an Int in Swift. Basic casting like this does not work because these types are not primitives, unlike float
Float
Int
float
Suppose you store float value in "X" and you are storing integer value in "Y".
"X"
"Y"
Var Y = Int(x);
or
var myIntValue = Int(myFloatValue)