Home > @josh-brown/vector > euclideanNorm
Calculates the Euclidean Norm (or 2-Norm) of a vector v
Signature:
export declare function euclideanNorm<S>(v: Vector<S>): number;|
Parameter |
Type |
Description |
|---|---|---|
|
v |
Vector<S> |
The vector for which to calculate the norm |
Returns:
number
const v = vec([3, 4]);
const norm = euclideanNorm(v); // 5