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

◆ Sum() [6/10]

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

Definition at line 7809 of file Enumerable.cs.

7810 {
7811 if (source == null)
7812 {
7813 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
7814 }
7815 double num = 0.0;
7816 foreach (float? item in source)
7817 {
7818 if (item.HasValue)
7819 {
7820 num += (double)item.GetValueOrDefault();
7821 }
7822 }
7823 return (float)num;
7824 }

References System.item, System.Linq.source, and System.Linq.ThrowHelper.ThrowArgumentNullException().