mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 01:39:23 +01:00
random extensions
This commit is contained in:
parent
16c0424f65
commit
69fd9797d0
2 changed files with 19 additions and 3 deletions
16
MLEM.Extended/Extensions/RandomExtensions.cs
Normal file
16
MLEM.Extended/Extensions/RandomExtensions.cs
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -14,14 +14,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoGame.Extended" Version="3.7.0"/>
|
||||
<PackageReference Include="MonoGame.Extended.Tiled" Version="3.7.0"/>
|
||||
<PackageReference Include="MonoGame.Extended" Version="3.7.0" />
|
||||
<PackageReference Include="MonoGame.Extended.Tiled" Version="3.7.0" />
|
||||
<PackageReference Include="MonoGame.Framework.Portable" Version="3.7.1.189">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MLEM\MLEM.csproj"/>
|
||||
<ProjectReference Include="..\MLEM\MLEM.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in a new issue