diff --git a/MLEM.Extended/Extensions/RandomExtensions.cs b/MLEM.Extended/Extensions/RandomExtensions.cs new file mode 100644 index 0000000..d55b797 --- /dev/null +++ b/MLEM.Extended/Extensions/RandomExtensions.cs @@ -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 range) { + return random.Next(range.Min, range.Max); + } + + public static float Range(this Random random, Range range) { + return random.NextSingle(range.Min, range.Max); + } + + } +} \ No newline at end of file diff --git a/MLEM.Extended/MLEM.Extended.csproj b/MLEM.Extended/MLEM.Extended.csproj index 70b9355..f344cd9 100644 --- a/MLEM.Extended/MLEM.Extended.csproj +++ b/MLEM.Extended/MLEM.Extended.csproj @@ -14,14 +14,14 @@ - - + + all - + \ No newline at end of file