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

◆ Sum() [4/10]

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

Definition at line 7840 of file Enumerable.cs.

7841 {
7842 if (source == null)
7843 {
7844 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
7845 }
7846 double num = 0.0;
7847 foreach (double? item in source)
7848 {
7849 if (item.HasValue)
7850 {
7851 num += item.GetValueOrDefault();
7852 }
7853 }
7854 return num;
7855 }

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