From 8555fc249935871ff729cbb18c811db85083979a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 29 Nov 2022 21:36:17 +0100 Subject: [PATCH] updated SingleRandom signatures to avoid confusions when calling --- MLEM/Misc/SingleRandom.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MLEM/Misc/SingleRandom.cs b/MLEM/Misc/SingleRandom.cs index 689bfba..bc1c0de 100644 --- a/MLEM/Misc/SingleRandom.cs +++ b/MLEM/Misc/SingleRandom.cs @@ -24,7 +24,7 @@ namespace MLEM.Misc { /// /// The seeds to use. /// The generated number. - public static int Int(params int[] seeds) { + public static int Int(int[] seeds) { return (int) (SingleRandom.Single(seeds) * int.MaxValue); } @@ -46,7 +46,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seeds to use. /// The generated number. - public static int Int(int maxValue, params int[] seeds) { + public static int Int(int maxValue, int[] seeds) { return (int) (maxValue * SingleRandom.Single(seeds)); } @@ -70,7 +70,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seeds to use. /// The generated number. - public static int Int(int minValue, int maxValue, params int[] seeds) { + public static int Int(int minValue, int maxValue, int[] seeds) { return (int) ((maxValue - minValue) * SingleRandom.Single(seeds)) + minValue; } @@ -90,7 +90,7 @@ namespace MLEM.Misc { /// /// The seeds to use. /// The generated number. - public static float Single(params int[] seeds) { + public static float Single(int[] seeds) { return (SingleRandom.Scramble(seeds) / (float) int.MaxValue + 1) / 2; } @@ -112,7 +112,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seeds to use. /// The generated number. - public static float Single(float maxValue, params int[] seeds) { + public static float Single(float maxValue, int[] seeds) { return maxValue * SingleRandom.Single(seeds); } @@ -136,7 +136,7 @@ namespace MLEM.Misc { /// The (exclusive) maximum value. /// The seeds to use. /// The generated number. - public static float Single(float minValue, float maxValue, params int[] seeds) { + public static float Single(float minValue, float maxValue, int[] seeds) { return (maxValue - minValue) * SingleRandom.Single(seeds) + minValue; }