Beispiel #1
0
        public static CurvyRange Absolute(float from, float to)
        {
            var R = new CurvyRange(RangeMode.Absolute, from, to);

            R.Validate();
            return(R);
        }
Beispiel #2
0
        public static CurvyRange NonLinear(float from, float to)
        {
            var R = new CurvyRange(RangeMode.NonLinear, from, to);

            R.Validate();
            return(R);
        }
Beispiel #3
0
        public static CurvyRange Relative(float from, float to)
        {
            var R = new CurvyRange(RangeMode.Relative, from, to);

            R.Validate();
            return(R);
        }
Beispiel #4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            CurvyRange R = obj as CurvyRange;

            if (R == null)
            {
                return(false);
            }

            return(Equals(R));
        }
Beispiel #5
0
 public bool Equals(CurvyRange with)
 {
     return(Mode == with.Mode &&
            Mathf.Approximately(From, with.From) &&
            Mathf.Approximately(To, with.To));
 }