AntTweakBar.Color4Variable.ValidateAndSet C# (CSharp) Method

ValidateAndSet() private method

Tries to set this variable's value, validating it.
private ValidateAndSet ( float r, float g, float b, float a ) : void
r float
g float
b float
a float
return void
        private void ValidateAndSet(float r, float g, float b, float a)
        {
            if (!IsValid(r, g, b, a)) {
                throw new ArgumentException("Invalid variable value.");
            } else {
                this.r = r;
                this.g = g;
                this.b = b;
                this.a = a;
            }
        }