AntTweakBar.VectorVariable.ValidateAndSet C# (CSharp) Method

ValidateAndSet() private method

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