Add feedforward components (#2045)

Add helper classes for computing feedforwards with parameters supplied by the characterization tool.
This commit is contained in:
Oblarg
2019-11-09 23:16:42 -05:00
committed by Peter Johnson
parent 5f33d6af12
commit 7dc7c71b58
13 changed files with 457 additions and 63 deletions

View File

@@ -838,6 +838,12 @@ SaturatingMultiplyAdd(T X, T Y, T A, bool *ResultOverflowed = nullptr) {
return SaturatingAdd(A, Product, &Overflowed);
}
// Typesafe implementation of the signum function. Returns -1 if negative, 1 if positive, 0 if 0.
template <typename T>
int sgn(T val) {
return (T(0) < val) - (val < T(0));
}
} // namespace wpi
#endif