Public/New-Vector.ps1
|
function New-Vector { <# .SYNOPSIS Creates a new Vector instance. .DESCRIPTION Constructs a Vector from an array of numeric components. .PARAMETER Components The numeric components of the vector, e.g. @(1,2,3). .EXAMPLE $v = New-Vector -Components @(1,2,3) #> [CmdletBinding()] [OutputType('Vector')] param( [Parameter(Mandatory, Position = 0)] [double[]] $Components ) return [Vector]::new($Components) } |