1 | <?php |
||
7 | class VibratingString implements VibratingStringInterface |
||
8 | { |
||
9 | private $frequency; |
||
10 | private $physicalLength; |
||
11 | |||
12 | /** |
||
13 | * VibratingString constructor. |
||
14 | * |
||
15 | * @param float $frequency The open string frequency (in Hz). |
||
16 | * @param float $physicalLength The physical length of the string (in mm). |
||
17 | */ |
||
18 | public function __construct(float $frequency, float $physicalLength = 500.0) |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | public function getFrequency(): float |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function getPhysicalLength(): float |
||
39 | } |
||
40 |