UNPKG

@sgratzl/science

Version:

Scientific and statistical computing in JavaScript.

7 lines (5 loc) 152 B
import len from './length'; export default function normalize(p) { var length = len(p); return p.map(function(d) { return d / length; }); };