You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetRandom{Int|Long|Decimal|Float|Double) should be friendlier when providing only a lower-bound for the range of acceptable values, and, instead of using the default parameter value and then potentially swapping them, should rather use the default range, added onto the minimum
ie if the user asks for GetRandomInt(100), then she probably expects a number of value at least 100, but the current implementation defaults the max to 10 and tries to protect the caller against accidental flipping of min & max, so the call above results in a number between 10 and 100 (inclusive). Probably not the original intention of the call, and not clear.
The text was updated successfully, but these errors were encountered:
GetRandom{Int|Long|Decimal|Float|Double)
should be friendlier when providing only a lower-bound for the range of acceptable values, and, instead of using the default parameter value and then potentially swapping them, should rather use the default range, added onto the minimumie if the user asks for
GetRandomInt(100)
, then she probably expects a number of value at least 100, but the current implementation defaults the max to10
and tries to protect the caller against accidental flipping of min & max, so the call above results in a number between 10 and 100 (inclusive). Probably not the original intention of the call, and not clear.The text was updated successfully, but these errors were encountered: