Skip to content

Commit dea0cde

Browse files
committed
Added overload for GetDecimal
1 parent 78977db commit dea0cde

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Source/RandomData.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ public static double GetDouble(double? min = null, double? max = null) {
145145
}
146146

147147
public static decimal GetDecimal() {
148-
byte scale = (byte)Instance.Next(29);
148+
return GetDecimal(GetInt(), GetInt());
149+
}
150+
151+
public static decimal GetDecimal(int min, int max) {
152+
byte scale = (byte) Instance.Next(29);
149153
bool sign = Instance.Next(2) == 1;
150-
return new decimal(GetInt(),
151-
GetInt(),
152-
GetInt(),
153-
sign,
154-
scale);
154+
return new decimal(min, GetInt(min, max), max, sign, scale);
155155
}
156156

157157
public static T GetEnum<T>() {

0 commit comments

Comments
 (0)