✨ Add day 12 part 1
This commit is contained in:
75
day_12/Velocity.php
Normal file
75
day_12/Velocity.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user