Sha256: d2512e88a406627f33abfc0e02d3475bb0b9f06a2bd56b090abfb102dde1b66a
Contents?: true
Size: 526 Bytes
Versions: 4
Compression:
Stored size: 526 Bytes
Contents
var π = Math.PI, ε = 1e-6, ε2 = ε * ε, d3_radians = π / 180, d3_degrees = 180 / π; function d3_sgn(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; } function d3_acos(x) { return x > 1 ? 0 : x < -1 ? π : Math.acos(x); } function d3_asin(x) { return x > 1 ? π / 2 : x < -1 ? -π / 2 : Math.asin(x); } function d3_sinh(x) { return (Math.exp(x) - Math.exp(-x)) / 2; } function d3_cosh(x) { return (Math.exp(x) + Math.exp(-x)) / 2; } function d3_haversin(x) { return (x = Math.sin(x / 2)) * x; }
Version data entries
4 entries across 4 versions & 2 rubygems