UNPKG

layout-base

Version:

Basic layout model and some utilities for Cytoscape.js layout extensions

13 lines (10 loc) 307 B
function RandomSeed() { } // adapted from: https://stackoverflow.com/a/19303725 RandomSeed.seed = 1; RandomSeed.x = 0; RandomSeed.nextDouble = function () { RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; return RandomSeed.x - Math.floor(RandomSeed.x); }; module.exports = RandomSeed;