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

◆ Max() [3/10]

static double System.Linq.Enumerable.Max ( this IEnumerable< double > source)
inlinestatic

Definition at line 5518 of file Enumerable.cs.

5519 {
5520 if (source == null)
5521 {
5522 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
5523 }
5524 using IEnumerator<double> enumerator = source.GetEnumerator();
5525 if (!enumerator.MoveNext())
5526 {
5527 ThrowHelper.ThrowNoElementsException();
5528 }
5529 double num = enumerator.Current;
5530 while (double.IsNaN(num))
5531 {
5532 if (!enumerator.MoveNext())
5533 {
5534 return num;
5535 }
5536 num = enumerator.Current;
5537 }
5538 while (enumerator.MoveNext())
5539 {
5540 double current = enumerator.Current;
5541 if (current > num)
5542 {
5543 num = current;
5544 }
5545 }
5546 return num;
5547 }

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