int randomInt(int mn, int mx) { return mn + rand() % (mx - mn); }
double randomDouble(double mn, double mx) { double d = (double)rand() / RAND_MAX; return mn + d * (mx - mn); }
478. Generate Random Point in a Circle (Medium)
Last updated 3 years ago