AntTweakBar.QuaternionVariable.ValidateAndSet C# (CSharp) Method

ValidateAndSet() private method

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