/*Convert a number with a fractional component (double or float) to an Int. Note, since Integers are whole numbers, converting a Double/Float to an Int will round down to the nearest whole number.*/
var myDoubleValue = 3.14 //Double
var myIntValue = Int(myDoubleValue)
println("The Int Value is \(myIntValue)")
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.