1 | <?php |
||
23 | class Vector |
||
24 | { |
||
25 | /** |
||
26 | * @var integer |
||
27 | */ |
||
28 | private $iX; |
||
29 | /** |
||
30 | * @var integer |
||
31 | */ |
||
32 | private $iY; |
||
33 | |||
34 | /** |
||
35 | * Vector constructor. |
||
36 | * |
||
37 | * @param int $iX |
||
38 | * @param int $iY |
||
39 | */ |
||
40 | 2 | public function __construct(int $iX, int $iY) |
|
45 | |||
46 | /** |
||
47 | * @return float |
||
48 | */ |
||
49 | 1 | public function getLength() |
|
53 | |||
54 | /** |
||
55 | * @return int |
||
56 | */ |
||
57 | 2 | public function getDeltaX() |
|
61 | |||
62 | /** |
||
63 | * @return int |
||
64 | */ |
||
65 | 2 | public function getDeltaY() |
|
69 | |||
70 | /** |
||
71 | * @param Vector $oVector |
||
72 | * |
||
73 | * @return Vector |
||
74 | */ |
||
75 | 1 | public function add(Vector $oVector) |
|
79 | } |
||
80 |