MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / seededRandom

Function seededRandom

scripts/poly2req.js:101–105  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

99// Custom seeded random number generator for reproducible test coordinates
100let seed = 0x1337;
101function seededRandom(min, max) {
102 seed = (seed * 9301 + 49297) % 233280;
103 const rnd = seed / 233280;
104 return min + rnd * (max - min);
105}
106
107// Generate random coordinate within the defined bounding box
108function getRandomCoordinate() {

Callers 1

getRandomCoordinateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected