From 6649f0d4c23dc680226cd270158ab43b1ab197a3 Mon Sep 17 00:00:00 2001 From: "W2.Wizard" Date: Wed, 13 Jan 2021 21:58:16 +0100 Subject: [PATCH] Removed unnecessary overload Same can be achieved by specifiying max. --- Source/Engine/Utilities/Extensions.cs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Source/Engine/Utilities/Extensions.cs b/Source/Engine/Utilities/Extensions.cs index ff3439b77..15238a701 100644 --- a/Source/Engine/Utilities/Extensions.cs +++ b/Source/Engine/Utilities/Extensions.cs @@ -286,6 +286,7 @@ namespace FlaxEngine.Utilities /// A random . public static Quaternion NextQuaternion(this Random random, bool randomRoll = false) { + return Quaternion.Euler( NextFloat(random, -180, 180), NextFloat(random, -180, 180), @@ -360,23 +361,12 @@ namespace FlaxEngine.Utilities /// Gets a random . /// /// An instance of . - /// The maximum value + /// The minimum value + /// The maximum value /// A random - public static double NextDouble(this Random random, double maxValue = 2.0d) + public static double NextDouble(this Random random, double min = 0.0d, double max = 2.0d) { - return random.NextDouble() * maxValue; - } - - /// - /// Gets a random . - /// - /// An instance of . - /// The minimum value - /// The maximum value - /// A random - public static double NextDouble(this Random random, double minValue = 0.0d, double maxValue = 2.0d) - { - return random.NextDouble() * (maxValue - minValue) + minValue; + return random.NextDouble() * (max - min) + min; } ///