diff --git a/X10D/src/RandomExtensions.cs b/X10D/src/RandomExtensions.cs index 072ab05..a217c83 100644 --- a/X10D/src/RandomExtensions.cs +++ b/X10D/src/RandomExtensions.cs @@ -16,23 +16,25 @@ namespace X10D internal static Random Random { get; } = new Random(); /// - /// Returns either or based on 's next - /// generation. + /// Returns either or based on the next generation of the current + /// . /// /// The instance. /// - /// Returns or depending on the return value - /// from . + /// if the return value from is greater than or + /// equal to 0.5 + /// -or- + /// otherwise. /// /// is . - public static bool CoinToss(this Random random) + public static bool NextBoolean(this Random random) { if (random is null) { throw new ArgumentNullException(nameof(random)); } - return random.Next(2) == 0; + return random.NextDouble() >= 0.5; } ///