| 1 | <?php |
||
| 5 | class Point |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * $x. |
||
| 9 | * |
||
| 10 | * @var int |
||
| 11 | */ |
||
| 12 | public $x = 0; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * $y. |
||
| 16 | * |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | public $y = 0; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * __construct. |
||
| 23 | * |
||
| 24 | * @param int $x |
||
| 25 | * @param int $y |
||
| 26 | */ |
||
| 27 | 37 | public function __construct($x = 0, $y = 0) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * empty. |
||
| 35 | * |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | 34 | public function isEmpty() |
|
| 42 | |||
| 43 | /** |
||
| 44 | * compare. |
||
| 45 | * |
||
| 46 | * @param Point $point |
||
| 47 | * @param string $operator |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | 22 | public function compare(Point $point, $operator = '=') |
|
| 67 | } |
||
| 68 |