#pragma once

#include <random>

int random_on_range(int n, std::mt19937 *engine) {
  std::uniform_int_distribution<int> dist(0,n-1);
  return dist(*engine);
}

int random_on_unit(std::mt19937 *engine) {
  std::uniform_real_distribution<double> dist(0.,1.);
  return dist(*engine);
}