Use Math.Abs on guid hashcode to ensure > 0

This commit is contained in:
Mike Parker
2020-12-24 15:37:58 +00:00
committed by GitHub
parent f2663587c4
commit fe2321ce22
@@ -11,7 +11,7 @@ namespace MonoGame.Extended.Particles
{
public unsafe class ParticleEmitter : IDisposable
{
private readonly FastRandom _random = new FastRandom(Guid.NewGuid().GetHashCode());
private readonly FastRandom _random = new FastRandom(Math.Abs(Guid.NewGuid().GetHashCode()));
private float _totalSeconds;
[JsonConstructor]