mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 20:58:34 +01:00
added random vector method
This commit is contained in:
parent
e20a51ef23
commit
529b725161
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
using MonoGame.Extended;
|
using MonoGame.Extended;
|
||||||
|
|
||||||
namespace MLEM.Extended.Extensions {
|
namespace MLEM.Extended.Extensions {
|
||||||
|
@ -12,5 +13,9 @@ namespace MLEM.Extended.Extensions {
|
||||||
return random.NextSingle(range.Min, range.Max);
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue