Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static class RandomExtension
- {
- public static double NextDouble(this Random r, int min, int max)
- {
- //return min + r.NextDouble() * (max - min);
- return r.Next(min + 1, max) - r.NextDouble();
- }
- public static double NextDouble(this Random r, double max)
- {
- return r.NextDouble() * max;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement