Public/Get-VectorMagnitude.ps1
|
function Get-VectorMagnitude { <# .SYNOPSIS Computes the magnitude (length) of a vector. .DESCRIPTION Returns the Euclidean norm of the given vector. .PARAMETER Vector The vector to measure. .EXAMPLE Get-VectorMagnitude -Vector (New-Vector 3,4) #> [CmdletBinding()] [OutputType([double])] param( [Parameter(Mandatory, Position = 0)] [Vector] $Vector ) return $Vector.Magnitude() } |