Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ InternalAggregate()

override double System.Linq.Parallel.DoubleMinMaxAggregationOperator.InternalAggregate ( ref Exception singularExceptionToThrow)
inlineprotected

Definition at line 77 of file DoubleMinMaxAggregationOperator.cs.

78 {
79 using IEnumerator<double> enumerator = GetEnumerator(ParallelMergeOptions.FullyBuffered, suppressOrderPreservation: true);
80 if (!enumerator.MoveNext())
81 {
83 return 0.0;
84 }
85 double num = enumerator.Current;
86 if (_sign == -1)
87 {
88 while (enumerator.MoveNext())
89 {
90 double current = enumerator.Current;
91 if (current < num || double.IsNaN(current))
92 {
93 num = current;
94 }
95 }
96 }
97 else
98 {
99 while (enumerator.MoveNext())
100 {
101 double current2 = enumerator.Current;
102 if (current2 > num || double.IsNaN(num))
103 {
104 num = current2;
105 }
106 }
107 }
108 return num;
109 }
static string NoElements
Definition SR.cs:16
Definition SR.cs:7

References System.Linq.Parallel.DoubleMinMaxAggregationOperator._sign, and System.SR.NoElements.