advent_of_code_2019/day_12/Velocity.php

76 lines
1.0 KiB
PHP
Raw Normal View History

2019-12-12 14:09:52 +01:00
<?php
class Velocity
{
protected $x;
protected $y;
protected $z;
/**
* Velocity constructor.
* @param $x
* @param $y
* @param $z
*/
public function __construct($x, $y, $z)
{
$this->x = $x;
$this->y = $y;
$this->z = $z;
}
/**
* @return mixed
*/
public function getX()
{
return $this->x;
}
/**
* @param mixed $x
* @return Velocity
*/
public function setX($x)
{
$this->x = $x;
return $this;
}
/**
* @return mixed
*/
public function getY()
{
return $this->y;
}
/**
* @param mixed $y
* @return Velocity
*/
public function setY($y)
{
$this->y = $y;
return $this;
}
/**
* @return mixed
*/
public function getZ()
{
return $this->z;
}
/**
* @param mixed $z
* @return Velocity
*/
public function setZ($z)
{
$this->z = $z;
return $this;
}
}