public AxisEventValue(IInputAxis axis, int rawValue, float value) { Axis = axis; RawValue = rawValue; NormalizedValue = (int)value.Rescale(0, 1, 16383, -16383); if (axis != null) { InvertedRawValue = axis.MaximumValue - rawValue + axis.MinimumValue; } InvertedNormalizedValue = (int)(1 - value).Rescale(0, 1, 16383, -16383); AxisValue = value; }
public AxisEventValue(IInputAxis axis) { Axis = axis; if (axis == null) { return; } RawValue = axis.RawValue; NormalizedValue = (int)axis.Rescale(axis.Value, 0, 1, 16383, -16383); InvertedRawValue = axis.MaximumValue - axis.RawValue + axis.MinimumValue; InvertedNormalizedValue = (int)axis.Rescale(1 - axis.Value, 0, 1, 16383, -16383); AxisValue = axis.Value; NormalizedRawValue = axis.Normalize(RawValue, axis.MinimumValue, axis.MaximumValue); }