FastLED 3.9.15
Loading...
Searching...
No Matches

◆ min_element() [2/2]

template<typename Iterator, typename Compare>
Iterator fl::min_element ( Iterator first,
Iterator last,
Compare comp )

Definition at line 74 of file algorithm.h.

74 {
75 if (first == last) {
76 return last;
77 }
78
79 Iterator min_iter = first;
80 ++first;
81
82 while (first != last) {
83 if (comp(*first, *min_iter)) {
84 min_iter = first;
85 }
86 ++first;
87 }
88
89 return min_iter;
90}