Returns an scaled representaion of the value contained in this IOHIDValueRef based on the scale type.
- macOS 10.5+
- Mac Catalyst 13.0+
The value to be queried. If this parameter is not a valid IOHIDValueRef, the behavior is undefined.
The type of scaling to be performed.
Returns an scaled floating point representation of the value.
The scaled value is based on the range described by the scale type's min and max, such that:
scaledValue = ((value - min) * (scaledMax - scaledMin) / (max - min)) + scaledMin
There are currently two types of scaling that can be applied:
kIOHIDValueScaleTypePhysical: Scales element value using the physical bounds of the device such that scaledMin = physicalMin and scaledMax = physicalMax.
kIOHIDValueScaleTypeCalibrated: Scales element value such that scaledMin = -1 and scaledMax = 1. This value will also take into account the calibration properties associated with this element.