Squashed 'third_party/Phoenix-frc-lib/' content from commit 666d176
Change-Id: Ibaca2fc8ffb1177e786576cc1e4cc9f7a8c98f13
git-subtree-dir: third_party/Phoenix-frc-lib
git-subtree-split: 666d176a08151793044ab74e0005f13d3732ed96
diff --git a/cpp/include/ctre/phoenix/Utilities.h b/cpp/include/ctre/phoenix/Utilities.h
new file mode 100644
index 0000000..ce591c8
--- /dev/null
+++ b/cpp/include/ctre/phoenix/Utilities.h
@@ -0,0 +1,20 @@
+#pragma once
+
+namespace ctre {
+namespace phoenix {
+
+class Utilities {
+public:
+ static float abs(float f);
+ static float bound(float value, float capValue = 1);
+ static float cap(float value, float peak);
+ static void Deadband(float &value, float deadband = -.10);
+ static bool IsWithin(float value, float compareTo, float allowDelta);
+ static int SmallerOf(int value_1, int value_2);
+ static void Split_1(float forward, float turn, float *left, float *right);
+ static void Split_2(float left, float right, float *forward, float *turn);
+private:
+ static bool Contains(char array[], char item);
+};
+
+}}