-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoordinate.php
More file actions
52 lines (44 loc) · 985 Bytes
/
coordinate.php
File metadata and controls
52 lines (44 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Created by PhpStorm.
* User: zjeff
* Date: 5/4/2019
* Time: 4:09 PM
*/
class coordinate
{
private $x;
private $y;
private $nearest_centroid_coordinate;
public function __construct($x, $y)
{
$this->x = $x;
$this->y = $y;
$this->nearest_centroid_coordinate = null;
}
public function get_nearest_centroid_coordinate()
{
return $this->nearest_centroid_coordinate;
}
public function set_nearest_centroid_coordinate($new_nearest_centroid_coordinate)
{
$this->nearest_centroid_coordinate = $new_nearest_centroid_coordinate;
}
public function set_coordinate($x, $y)
{
$this->x = $x;
$this->y = $y;
}
public function get_x()
{
return $this->x;
}
public function get_y()
{
return $this->y;
}
public function pretty_printing()
{
return "Plot X: " . $this->x . " Plot Y: " . $this->y. "<br>";
}
}