(volume: Percentage)
| 41 | * @returns The new volume percentage after decreasing, or `0` if already at minimum. |
| 42 | */ |
| 43 | export function decreaseVolume(volume: Percentage): Percentage { |
| 44 | if (canDecreaseVolume(volume)) { |
| 45 | return (volume - VOLUME_STEP) as Percentage; |
| 46 | } |
| 47 | |
| 48 | return MINIMUM_VOLUME_PERCENTAGE; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Increases the volume by one step, clamping to the maximum. |
no test coverage detected