2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
Loading...
Searching...
No Matches
general.h
Go to the documentation of this file.
1
4
5#pragma once
6
7namespace argos_lib {
8
18 template <typename T>
19 constexpr static bool InThreshold(const T value, const T target, const T threshold) {
20 return value >= target - threshold && value <= target + threshold;
21 }
22} // namespace argos_lib
Definition: swap_controllers_command.h:12
static constexpr bool InThreshold(const T value, const T target, const T threshold)
Detect if a value is within a threshold of a target value.
Definition: general.h:19