hashD function

double hashD(
  1. double a,
  2. double b
)

Deterministic hash in [0, 1).

Implementation

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