Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Min() [6/10]

static ? float System.Linq.Enumerable.Min ( this IEnumerable< float?> source)
inlinestatic

Definition at line 6456 of file Enumerable.cs.

6457 {
6458 if (source == null)
6459 {
6460 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
6461 }
6462 float? result = null;
6463 using IEnumerator<float?> enumerator = source.GetEnumerator();
6464 while (enumerator.MoveNext())
6465 {
6466 result = enumerator.Current;
6467 if (!result.HasValue)
6468 {
6469 continue;
6470 }
6471 float num = result.GetValueOrDefault();
6472 if (float.IsNaN(num))
6473 {
6474 return result;
6475 }
6476 while (enumerator.MoveNext())
6477 {
6478 float? current = enumerator.Current;
6479 if (current.HasValue)
6480 {
6481 float valueOrDefault = current.GetValueOrDefault();
6482 if (valueOrDefault < num)
6483 {
6484 num = valueOrDefault;
6485 result = current;
6486 }
6487 else if (float.IsNaN(valueOrDefault))
6488 {
6489 return current;
6490 }
6491 }
6492 }
6493 return result;
6494 }
6495 return result;
6496 }

References System.Collections.Generic.Dictionary< TKey, TValue >.GetEnumerator(), System.Linq.source, and System.Linq.ThrowHelper.ThrowArgumentNullException().