-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport UnitOfMeasure tweaks from v5
- Loading branch information
Showing
61 changed files
with
506 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* PHPCoord. | ||
* | ||
* @author Doug Wright | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace PHPCoord\UnitOfMeasure\Angle; | ||
|
||
use const M_PI; | ||
|
||
class CentesimalSecond extends Angle | ||
{ | ||
private float $angle; | ||
|
||
public function __construct(float $angle) | ||
{ | ||
$this->angle = $angle; | ||
} | ||
|
||
public function asRadians(): Radian | ||
{ | ||
return new Radian($this->angle * M_PI / 2000000); | ||
} | ||
|
||
public function getValue(): float | ||
{ | ||
return $this->angle; | ||
} | ||
|
||
public function getUnitName(): string | ||
{ | ||
return 'centesimal second'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.