Revert "Graph layout optimizations"

This commit is contained in:
Filip Barl
2017-02-02 11:42:12 +01:00
committed by GitHub
parent 95c688d1b1
commit 8eaa12e680
33 changed files with 870 additions and 795 deletions
+7
View File
@@ -18,3 +18,10 @@
export function modulo(i, n) {
return ((i % n) + n) % n;
}
// Does the same that the deprecated d3.round was doing.
// Possibly imprecise: This https://github.com/d3/d3/issues/210
export function round(value, decimals = 0) {
const p = Math.pow(10, decimals);
return Math.round(value * p) / p;
}