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

◆ Average() [5/10]

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

Definition at line 3823 of file Enumerable.cs.

3824 {
3825 if (source == null)
3826 {
3827 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
3828 }
3829 using IEnumerator<float> enumerator = source.GetEnumerator();
3830 if (!enumerator.MoveNext())
3831 {
3832 ThrowHelper.ThrowNoElementsException();
3833 }
3834 double num = enumerator.Current;
3835 long num2 = 1L;
3836 while (enumerator.MoveNext())
3837 {
3838 num += (double)enumerator.Current;
3839 num2++;
3840 }
3841 return (float)(num / (double)num2);
3842 }

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