protected static float clamp(float val, AxisSettings axis)
        {
            if (axis.min == axis.max)
            {
                return(val * axis.mult);
            }

            return(Math.Min(Math.Max(val * axis.mult, axis.min), axis.max));
        }
Beispiel #2
0
        protected static float clamp(float val, AxisSettings axis)
        {
            if (axis.min == axis.max)
                return val * axis.mult;

            return Math.Min(Math.Max(val * axis.mult, axis.min), axis.max);
        }