Deterministic hash in [0, 1).
double hashD(double a, double b) { final h = math.sin(a * 12.9898 + b * 78.233) * 43758.5453; return h - h.floorToDouble(); }