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; } }