mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
14 lines
280 B
PowerShell
14 lines
280 B
PowerShell
function ConvertFrom-Percent()
|
|
{
|
|
param (
|
|
$Value = $null,
|
|
$Percent = $null,
|
|
[int]$Digits = 0
|
|
);
|
|
|
|
if ($null -eq $Value -Or $null -eq $Percent) {
|
|
return 0;
|
|
}
|
|
|
|
return ([math]::Round(($Value / 100 * $Percent), $Digits));
|
|
}
|