Skip to content

Latest commit

 

History

History
62 lines (31 loc) · 819 Bytes

File metadata and controls

62 lines (31 loc) · 819 Bytes

Home > @josh-brown/vector > euclideanNorm

euclideanNorm() function

Calculates the Euclidean Norm (or 2-Norm) of a vector v

Signature:

export declare function euclideanNorm<S>(v: Vector<S>): number;

Parameters

Parameter

Type

Description

v

Vector<S>

The vector for which to calculate the norm

Returns:

number

Example

const v = vec([3, 4]);
const norm = euclideanNorm(v); // 5