UnityEditor.SerializedMinMaxCurve.InitDoubleScalars C# (CSharp) Method

InitDoubleScalars() private method

private InitDoubleScalars ( MinMaxCurveState oldState ) : void
oldState MinMaxCurveState
return void
        private void InitDoubleScalars(MinMaxCurveState oldState)
        {
            this.minConstant = this.GetAverageKeyValue(this.minCurve.animationCurveValue.keys) * this.scalar.floatValue;
            switch (oldState)
            {
                case MinMaxCurveState.k_Scalar:
                    this.maxConstant = this.scalar.floatValue;
                    break;

                case MinMaxCurveState.k_Curve:
                case MinMaxCurveState.k_TwoCurves:
                    this.maxConstant = this.GetAverageKeyValue(this.maxCurve.animationCurveValue.keys) * this.scalar.floatValue;
                    break;

                default:
                    Debug.LogError("Enum not handled!");
                    break;
            }
            this.SetCurveRequirements();
        }