1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-25 22:18:34 +01:00

added random vector method

This commit is contained in:
Ellpeck 2020-01-04 21:55:10 +01:00
parent e20a51ef23
commit 529b725161

View file

@ -1,4 +1,5 @@
using System;
using Microsoft.Xna.Framework;
using MonoGame.Extended;
namespace MLEM.Extended.Extensions {
@ -12,5 +13,9 @@ namespace MLEM.Extended.Extensions {
return random.NextSingle(range.Min, range.Max);
}
public static Vector2 Vector2(this Random random, float min, float max) {
return new Vector2(random.NextSingle(min, max), random.NextSingle(min, max));
}
}
}