Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 663 Bytes

File metadata and controls

19 lines (11 loc) · 663 Bytes

Home > @josh-brown/vector > Norm

Norm type

A function that calculates a norm for a vector.

Signature:

export type Norm<S = number> = (v: Vector<S>) => number;

References: Vector

Remarks

A Norm should satisfy: - norm(v) is greater than 0 when v is not the zero vector - norm(v) equals 0 when v is the zero vector - norm(k * v) equals k * norm(v) - norm(v + w) is less than or equal to norm(v) + norm(w) (the triangle inequality)