Passed
Push — master ( 0baa7a...f13449 )
by Doug
50:51
created

CentesimalSecond::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\UnitOfMeasure\Angle;
10
11
use const M_PI;
12
13
class CentesimalSecond extends Angle
14
{
15
    private float $angle;
16
17
    public function __construct(float $angle)
18
    {
19
        $this->angle = $angle;
20
    }
21
22
    public function asRadians(): Radian
23
    {
24
        return new Radian($this->angle * M_PI / 2000000);
25
    }
26
27
    public function getValue(): float
28
    {
29
        return $this->angle;
30
    }
31
32
    public function getUnitName(): string
33
    {
34
        return 'centesimal second';
35
    }
36
}
37