From 88efc6b41c9a92ab58d8906a95f2c2a6bda50d04 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 29 Nov 2022 21:29:53 +0100 Subject: [PATCH] fixed Single min/max values being integers --- MLEM/Misc/SingleRandom.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MLEM/Misc/SingleRandom.cs b/MLEM/Misc/SingleRandom.cs index ee1bb15..689bfba 100644 --- a/MLEM/Misc/SingleRandom.cs +++ b/MLEM/Misc/SingleRandom.cs @@ -101,7 +101,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seed to use. /// The generated number. - public static float Single(int maxValue, int seed) { + public static float Single(float maxValue, int seed) { return maxValue * SingleRandom.Single(seed); } @@ -112,7 +112,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seeds to use. /// The generated number. - public static float Single(int maxValue, params int[] seeds) { + public static float Single(float maxValue, params int[] seeds) { return maxValue * SingleRandom.Single(seeds); } @@ -124,7 +124,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seed to use. /// The generated number. - public static float Single(int minValue, int maxValue, int seed) { + public static float Single(float minValue, float maxValue, int seed) { return (maxValue - minValue) * SingleRandom.Single(seed) + minValue; } @@ -136,7 +136,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seeds to use. /// The generated number. - public static float Single(int minValue, int maxValue, params int[] seeds) { + public static float Single(float minValue, float maxValue, params int[] seeds) { return (maxValue - minValue) * SingleRandom.Single(seeds) + minValue; }