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

◆ MakeIntermediateReduceFunction()

static Func< Pair< bool, T >, T, Pair< bool, T > > System.Linq.AggregationMinMaxHelpers< T >.MakeIntermediateReduceFunction ( int sign)
inlinestaticprivate

Definition at line 27 of file AggregationMinMaxHelpers.cs.

28 {
29 Comparer<T> comparer = Util.GetDefaultComparer<T>();
30 return (Pair<bool, T> accumulator, T element) => ((default(T) != null || element != null) && (!accumulator.First || Util.Sign(comparer.Compare(element, accumulator.Second)) == sign)) ? new Pair<bool, T>(first: true, element) : accumulator;
31 }
static int Sign(int x)
Definition Util.cs:57

References System.comparer, System.Linq.first, and System.Linq.Parallel.Util.Sign().

Referenced by System.Linq.AggregationMinMaxHelpers< T >.Reduce().