1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

random extensions

This commit is contained in:
Ellpeck 2019-12-04 13:06:53 +01:00
parent 16c0424f65
commit 69fd9797d0
2 changed files with 19 additions and 3 deletions

View file

@ -0,0 +1,16 @@
using System;
using MonoGame.Extended;
namespace MLEM.Extended.Extensions {
public static class RandomExtensions {
public static int Range(this Random random, Range<int> range) {
return random.Next(range.Min, range.Max);
}
public static float Range(this Random random, Range<float> range) {
return random.NextSingle(range.Min, range.Max);
}
}
}