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

◆ InternalAggregate()

override? float System.Linq.Parallel.NullableFloatMinMaxAggregationOperator.InternalAggregate ( ref Exception singularExceptionToThrow)
inlineprotected

Definition at line 77 of file NullableFloatMinMaxAggregationOperator.cs.

78 {
79 using IEnumerator<float?> enumerator = GetEnumerator(ParallelMergeOptions.FullyBuffered, suppressOrderPreservation: true);
80 if (!enumerator.MoveNext())
81 {
82 return null;
83 }
84 float? num = enumerator.Current;
85 if (_sign == -1)
86 {
87 while (enumerator.MoveNext())
88 {
89 float? current = enumerator.Current;
90 if (current.HasValue && (!num.HasValue || current < num || float.IsNaN(current.GetValueOrDefault())))
91 {
92 num = current;
93 }
94 }
95 }
96 else
97 {
98 while (enumerator.MoveNext())
99 {
100 float? current2 = enumerator.Current;
101 if (current2.HasValue && (!num.HasValue || current2 > num || float.IsNaN(num.GetValueOrDefault())))
102 {
103 num = current2;
104 }
105 }
106 }
107 return num;
108 }

References System.Linq.Parallel.NullableFloatMinMaxAggregationOperator._sign.