UNPKG
@sgratzl/science
Version:
latest (2.0.0)
2.0.0
Scientific and statistical computing in JavaScript.
github.com/sgratzl/science.js
sgratzl/science.js
@sgratzl/science
/
src
/
lin
/
normalize.js
7 lines
(5 loc)
•
152 B
JavaScript
View Raw
1
2
3
4
5
6
7
import
len
from
'./length'
;
export
default
function
normalize
(
p
) {
var
length =
len
(p);
return
p.
map
(
function
(
d
) {
return
d / length; }); };