Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,36 @@
function Group-Range
{
[CmdletBinding()]
[OutputType([PSCustomObject])]
Param
(
[Parameter(Mandatory=$true,
Position=0)]
[ValidateCount(2,2)]
[double[]]
$Range1,
[Parameter(Mandatory=$true,
Position=1)]
[ValidateCount(2,2)]
[double[]]
$Range2,
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
Position=2)]
[double]
$Map
)
Process
{
foreach ($number in $Map)
{
[PSCustomObject]@{
Index = $number
Mapping = $Range2[0] + ($number - $Range1[0]) * ($Range2[0] - $Range2[1]) / ($Range1[0] - $Range1[1])
}
}
}
}

View file

@ -0,0 +1 @@
0..10 | Group-Range (0,10) (-1,0)