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

◆ Max() [5/10]

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

Definition at line 5593 of file Enumerable.cs.

5594 {
5595 if (source == null)
5596 {
5597 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
5598 }
5599 using IEnumerator<float> enumerator = source.GetEnumerator();
5600 if (!enumerator.MoveNext())
5601 {
5602 ThrowHelper.ThrowNoElementsException();
5603 }
5604 float num = enumerator.Current;
5605 while (float.IsNaN(num))
5606 {
5607 if (!enumerator.MoveNext())
5608 {
5609 return num;
5610 }
5611 num = enumerator.Current;
5612 }
5613 while (enumerator.MoveNext())
5614 {
5615 float current = enumerator.Current;
5616 if (current > num)
5617 {
5618 num = current;
5619 }
5620 }
5621 return num;
5622 }

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