Converts an array of single-precision floating-point values to unsigned 16-bit integer values, rounding towards nearest integer.
SDKs
- iOS 4.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Accelerate
Declaration
func vDSP_vfixru16(_ __A: Unsafe Pointer<Float>, _ __IA: v DSP _Stride, _ __C: Unsafe Mutable Pointer<UInt16>, _ __IC: v DSP _Stride, _ __N: v DSP _Length)
Parameters
__A
Source vector.
__IA
Source vector stride length.
__C
Destination vector.
__IC
Destination vector stride length.
__N
Number of elements in vector.
Discussion
If the resulting value is outside the bounds of the output type, the behavior is undefined. If you need to handle out-of-bounds data, you should use one of the functions in Clipping Operations on the data first.