integral / fractional part

node v8.17.0
version: 1.0.0
endpointsharetweet
let ip = n => ~~n; let fp = n => n - ip(n);
ip(Math.PI);
fp(Math.PI);
fp(-.24124);
Loading…

no comments

    sign in to comment