Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

round up swift

let number = 0.1
// Use ceil to remove the fractional part and round up.
let result = ceil(number)


let number1 = 1.1
// Use floor to remove the fractional part and round down.
let floor1 = floor(number1)
 
PREVIOUS NEXT
Tagged: #swift
ADD COMMENT
Topic
Name
9+9 =