Set X value.

@param int $x

@return Point
@throws \InvalidArgumentException
965630
protected function setX($x)
	{
		if ( ! is_numeric($x) || $x < 0)
		{
			throw new \InvalidArgumentException('The value of x must be a positive numeric.');
		}
		
		$this->x = (int) $x;
		
		return $this;
	}
1166204
public function setNumber($number)
    {
        if (!is_string($number) && !is_null($number)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->number = $number;

        return $this;
    }
369207
public function setByMonthDay($day)
    {
        if (!is_integer($day) || $day > 31 || $day < -31 || $day === 0) {
            throw new InvalidArgumentException('Invalid value for BYMONTHDAY');
        }

        $this->byMonthDay = $day;

        $this->canUseBySetPos = true;

        return $this;
    }
204918
public function setLimit($limit) {
        if (!is_numeric($limit) || $limit < 0) {
            throw new \InvalidArgumentException("Invalid limit '$limit.'", 500);
        }

        $this->limit = (int)$limit;
        return $this;
    }
180132
public function setValue($value) {
		if ($value instanceof \ArrayObject)
			$this->value = $value->getArrayCopy();
		elseif (is_object($value))
			$this->value = get_object_vars($value);
		elseif (is_array($value))
			$this->value = $value;
		else
			throw new \InvalidArgumentException("Method 'setValue' expected an object or array value");
		
		return $this;
	}
985635
public function setX($x)
    {

        $this->x = MathUtil::capValue($x, 0, XyzColorInterface::REF_X);

        return $this;
    }
398746
public function setPrecision($precision)
	{
		$available = [self::PRECISION_FIXED, self::PRECISION_DOUBLE, self::PRECISION_FLOAT];
		
		if ( ! is_scalar($precision) || ! in_array($precision, $available, false))
		{
			throw new \InvalidArgumentException(sprintf('Wrong precision value for %s, available values are %s',
				(string) $precision, implode(', ', $available)));
		}
		
		$this->precision = (string) $precision;
		
		return $this;
	}
1056266
public function setWhen($value)
    {
        if (!is_callable($value) && $value !== null) {
            throw new InvalidArgumentException('When parameter must be callable type');
        }
        $this->when = $value;

        return $this;
    }
1292156
public function point($int_x, $int_y)
    {
        if (is_double($int_x)) {
            $int_x = (integer) $int_x;
        }

        if (is_double($int_y)) {
            $int_y = (integer) $int_y;
        }
        if (!is_integer($int_x) || !is_integer($int_y) || $int_x < 0 || $int_y < 0) {
            throw new \InvalidArgumentException('Coordinates must be valid positive integers!');
        }

        $this->point->x = $int_x;
        $this->point->y = $int_y;

        return $this;
    }
256268
public function setMax($max)
    {
        if (!is_int($max)) {
            throw new \InvalidArgumentException('The attribute max on the class Attribute has to be integer (' . gettype($max) . ('object' === gettype($max) ? ' ' . get_class($max) : '') . ' given).');
        }

        $this->max = $max;

        return $this;
    }
478870
public function setValue($value)
    {
        $this->_value = $value;
        $this->getInput()->setValue($value);
        return $this;
    }
212172
public function setLocation($location)
    {
        if (! is_int($location)) {
            throw new \InvalidArgumentException(
                'Argument 1 must be an int value. Valued passed is of type ' . gettype($location));
        }
        
        $this->location = $location;
    }
124491
public function interpolate( $x )
	{
		$keys	= array_keys( $this->data );
		$n	= count( $keys );
		$p	= $this->polynomial[$n-1];
		for( $i=$n-2; $i>=0; $i-- )
			$p	= $p * ( $x - $keys[$i] ) + $this->polynomial[$i];
		return $p;
	}
1071340
public function offsetSet($offset, $value)
    {
        if (!(is_integer($offset) && $offset >= 0 && $offset <= $this->count()))
        {
            throw new \InvalidArgumentException('The offset must be a valid, positive integer.');
        }

        if (!$value instanceof Token)
        {
            throw new \InvalidArgumentException('The value provided must be a token.');
        }

        $this->tokens[$offset] = $value;
    }
578862
public function setAxis($axis)
    {
        if (is_string($axis) === true) {
            $this->axis = $axis;
        } else {
            $msg = "The 'axis' argument must be a string, '" . gettype($axis) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
729927
public static function create($x, $y)
	{
		$point = new Point();
		$point->x = $x;
		$point->y = $y;
		return $point;
	}
452487
public function setRange($value)
    {
        if (is_array($value) || $value instanceof \Traversable) {
            $this->range = $value;
        } else {
            throw new InvalidArgumentException('Range param must be instance of an array or Traversable');
        }

        return $this;
    }