@@ -221,7 +221,7 @@ public static int RandomFlag(this IRng self, BitList mask)
221
221
/// Returns a random float number between min [inclusive] and max [inclusive] with chance offset to max values.
222
222
/// </summary>
223
223
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
224
- public static float Ascending ( this IRng self , float min , float max , float offsetIntensity )
224
+ public static float Ascending ( this IRng self , float min , float max , float offsetIntensity = 1f )
225
225
{
226
226
if ( min < max )
227
227
return AscendingInternal ( self , min , max , offsetIntensity ) ;
@@ -232,7 +232,7 @@ public static float Ascending(this IRng self, float min, float max, float offset
232
232
throw ThrowErrors . MinMax ( nameof ( min ) , nameof ( max ) ) ;
233
233
}
234
234
235
- private static float AscendingInternal ( IRng self , float min , float max , float offsetIntensity )
235
+ private static float AscendingInternal ( IRng self , float min , float max , float offsetIntensity = 1f )
236
236
{
237
237
float range = max - min ;
238
238
float rnd = self . Next ( 0f , 1f ) ;
@@ -243,7 +243,7 @@ private static float AscendingInternal(IRng self, float min, float max, float of
243
243
/// Returns a random float number within range (min/max inclusive) with chance offset to max values.
244
244
/// </summary>
245
245
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
246
- public static float Ascending ( this IRng self , in Diapason range , float offsetIntensity )
246
+ public static float Ascending ( this IRng self , in Diapason range , float offsetIntensity = 1f )
247
247
{
248
248
return Ascending ( self , range . Min , range . Max , offsetIntensity ) ;
249
249
}
@@ -252,7 +252,7 @@ public static float Ascending(this IRng self, in Diapason range, float offsetInt
252
252
/// Returns a random float number within range (min/max inclusive) with chance offset to max values.
253
253
/// </summary>
254
254
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
255
- public static float Ascending ( this IRng self , in ( float min , float max ) range , float offsetIntensity )
255
+ public static float Ascending ( this IRng self , in ( float min , float max ) range , float offsetIntensity = 1f )
256
256
{
257
257
return Ascending ( self , range . min , range . max , offsetIntensity ) ;
258
258
}
@@ -261,7 +261,7 @@ public static float Ascending(this IRng self, in (float min, float max) range, f
261
261
/// Returns a random float number between min [inclusive] and max [inclusive] with chance offset to min values.
262
262
/// </summary>
263
263
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
264
- public static float Descending ( this IRng self , float min , float max , float offsetIntensity )
264
+ public static float Descending ( this IRng self , float min , float max , float offsetIntensity = 1f )
265
265
{
266
266
if ( min < max )
267
267
return DescendingInternal ( self , min , max , offsetIntensity ) ;
@@ -272,7 +272,7 @@ public static float Descending(this IRng self, float min, float max, float offse
272
272
throw ThrowErrors . MinMax ( nameof ( min ) , nameof ( max ) ) ;
273
273
}
274
274
275
- private static float DescendingInternal ( IRng self , float min , float max , float offsetIntensity )
275
+ private static float DescendingInternal ( IRng self , float min , float max , float offsetIntensity = 1f )
276
276
{
277
277
float range = max - min ;
278
278
float rnd = self . Next ( 0f , 1f ) ;
@@ -283,7 +283,7 @@ private static float DescendingInternal(IRng self, float min, float max, float o
283
283
/// Returns a random float number within range (min/max inclusive) with chance offset to min values.
284
284
/// </summary>
285
285
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
286
- public static float Descending ( this IRng self , in Diapason range , float offsetIntensity )
286
+ public static float Descending ( this IRng self , in Diapason range , float offsetIntensity = 1f )
287
287
{
288
288
return Descending ( self , range . Min , range . Max , offsetIntensity ) ;
289
289
}
@@ -292,7 +292,7 @@ public static float Descending(this IRng self, in Diapason range, float offsetIn
292
292
/// Returns a random float number within range (min/max inclusive) with chance offset to min values.
293
293
/// </summary>
294
294
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
295
- public static float Descending ( this IRng self , in ( float min , float max ) range , float offsetIntensity )
295
+ public static float Descending ( this IRng self , in ( float min , float max ) range , float offsetIntensity = 1f )
296
296
{
297
297
return Descending ( self , range . min , range . max , offsetIntensity ) ;
298
298
}
@@ -301,7 +301,7 @@ public static float Descending(this IRng self, in (float min, float max) range,
301
301
/// Returns a random float number between min [inclusive] and max [inclusive] with chance offset to min and max values.
302
302
/// </summary>
303
303
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
304
- public static float MinMax ( this IRng self , float min , float max , float offsetIntensity )
304
+ public static float MinMax ( this IRng self , float min , float max , float offsetIntensity = 1f )
305
305
{
306
306
if ( min < max )
307
307
{
@@ -319,7 +319,7 @@ public static float MinMax(this IRng self, float min, float max, float offsetInt
319
319
/// Returns a random float number within range (min/max inclusive) with chance offset to min and max values.
320
320
/// </summary>
321
321
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
322
- public static float MinMax ( this IRng self , in Diapason range , float offsetIntensity )
322
+ public static float MinMax ( this IRng self , in Diapason range , float offsetIntensity = 1f )
323
323
{
324
324
return MinMax ( self , range . Min , range . Max , offsetIntensity ) ;
325
325
}
@@ -328,7 +328,7 @@ public static float MinMax(this IRng self, in Diapason range, float offsetIntens
328
328
/// Returns a random float number within range (min/max inclusive) with chance offset to min and max values.
329
329
/// </summary>
330
330
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
331
- public static float MinMax ( this IRng self , in ( float min , float max ) range , float offsetIntensity )
331
+ public static float MinMax ( this IRng self , in ( float min , float max ) range , float offsetIntensity = 1f )
332
332
{
333
333
return MinMax ( self , range . min , range . max , offsetIntensity ) ;
334
334
}
@@ -337,7 +337,7 @@ public static float MinMax(this IRng self, in (float min, float max) range, floa
337
337
/// Returns a random float number between min [inclusive] and max [inclusive] with chance offset to average values.
338
338
/// </summary>
339
339
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
340
- public static float Average ( this IRng self , float min , float max , float offsetIntensity )
340
+ public static float Average ( this IRng self , float min , float max , float offsetIntensity = 1f )
341
341
{
342
342
if ( min < max )
343
343
{
@@ -355,7 +355,7 @@ public static float Average(this IRng self, float min, float max, float offsetIn
355
355
/// Returns a random float number within range (min/max inclusive) with chance offset to average values.
356
356
/// </summary>
357
357
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
358
- public static float Average ( this IRng self , in Diapason range , float offsetIntensity )
358
+ public static float Average ( this IRng self , in Diapason range , float offsetIntensity = 1f )
359
359
{
360
360
return Average ( self , range . Min , range . Max , offsetIntensity ) ;
361
361
}
@@ -364,7 +364,7 @@ public static float Average(this IRng self, in Diapason range, float offsetInten
364
364
/// Returns a random float number within range (min/max inclusive) with chance offset to average values.
365
365
/// </summary>
366
366
/// <param name="offsetIntensity">Offset intensity from zero to infinity. There is no offset if intensity is zero.</param>
367
- public static float Average ( this IRng self , in ( float min , float max ) range , float offsetIntensity )
367
+ public static float Average ( this IRng self , in ( float min , float max ) range , float offsetIntensity = 1f )
368
368
{
369
369
return Average ( self , range . min , range . max , offsetIntensity ) ;
370
370
}
0 commit comments