Creates an integer from the given floating-point value, rounding toward zero.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 6.1+
Framework
- Core Graphics
Declaration
Parameters
value
A floating-point value to convert to an integer.
value
must be representable in this type after rounding toward zero.
Discussion
Any fractional part of value
is removed, rounding the resulting value toward zero.