Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,36 +0,0 @@
|
|||
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])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
0..10 | Group-Range (0,10) (-1,0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue