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

◆ Average() [3/10]

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

Definition at line 3876 of file Enumerable.cs.

3877 {
3878 if (source == null)
3879 {
3880 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
3881 }
3882 using IEnumerator<double> enumerator = source.GetEnumerator();
3883 if (!enumerator.MoveNext())
3884 {
3885 ThrowHelper.ThrowNoElementsException();
3886 }
3887 double num = enumerator.Current;
3888 long num2 = 1L;
3889 while (enumerator.MoveNext())
3890 {
3891 num += enumerator.Current;
3892 num2++;
3893 }
3894 return num / (double)num2;
3895 }

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