앱/Swift
Swift) 소수점 다루기
진ddang
2023. 8. 18. 03:02
- ceil(값) = 소수점 올림
- floor(값) = 소수점 내림
- trunc(값) = 소수점 버림
- round(값) = 소수점 반올림
ceil(Int(someValue)!)
round(Int(someValue)!)
floor(Int(someValue)!)
trunc(Int(someValue)!)
반응형