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

◆ Average() [1/10]

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

Definition at line 3929 of file Enumerable.cs.

3930 {
3931 if (source == null)
3932 {
3933 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
3934 }
3935 using IEnumerator<decimal> enumerator = source.GetEnumerator();
3936 if (!enumerator.MoveNext())
3937 {
3938 ThrowHelper.ThrowNoElementsException();
3939 }
3940 decimal current = enumerator.Current;
3941 long num = 1L;
3942 while (enumerator.MoveNext())
3943 {
3944 current += enumerator.Current;
3945 num++;
3946 }
3947 return current / (decimal)num;
3948 }

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