Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
NumericRange.h
1 #pragma once
2 
3 template <class T>
4 class NumericRange {
5 public:
6  NumericRange(T start, T end) : _start(start), _end(end) {}
7  bool contains(T value) { return value >= _start && value < _end; }
8 
9 private:
10  T _start;
11  T _end;
12 
13 };
14