API reference

Utils Class

Internal Static Methods

ControllerToFfiController ( controller )
Converts Controller type to Ffi.Controller type.
Signature
static Ffi.Controller Oculus.Haptics.Utils.ControllerToFfiController(Controller controller)
Parameters
controller: Controller  Controller type.
Throws
ArgumentException  If an invalid Controller type was passed in.
Map ( input , inMin , inMax , outMin , outMax )
Linearly scale a value from its "position" in a source range to an equivalent value in a target range. Does not impose clamping within the range, that is, when input is outside the input range it will map to an appropriate value outside the output range.
Signature
static float Oculus.Haptics.Utils.Map(int input, int inMin, int inMax, int outMin, int outMax)
Parameters
input: int  The value to be scaled.
inMin: int  The lower limit of the source range.
inMax: int  The upper limit of the source range.
outMin: int  The lower limit of the target range.
outMax: int  The upper limit of the target range.
Returns
float