Passed
Push — master ( 65e631...545eb8 )
by Roma
03:28
created

Point::angle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Hotrush\Polarcy;
4
5
class Point
6
{
7
    /**
8
     * @var float
9
     */
10
    private $x;
11
12
    /**
13
     * @var float
14
     */
15
    private $y;
16
17
    /**
18
     * Point constructor.
19
     *
20
     * @param mixed $x
21
     * @param mixed $y
22
     */
23
    public function __construct($x, $y)
24
    {
25
        $this->x = floatval($x);
26
        $this->y = floatval($y);
27
    }
28
29
    /**
30
     * @return float
31
     */
32
    public function x()
33
    {
34
        return $this->x;
35
    }
36
37
    /**
38
     * @return float
39
     */
40
    public function y()
41
    {
42
        return $this->y;
43
    }
44
}