FRC Paradigm Shift #1259
Documentation for the 2021 Robot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Util.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <wpi\math>
4
#include "
Constants.h
"
5
6
using namespace
std
;
7
8
9
class
Util
10
{
11
public
:
13
static
double
DegreesToRadians(
double
theta);
14
16
static
double
RadiansToDegrees(
double
theta);
17
21
static
double
ZeroTo2PiRads(
double
theta);
22
26
static
double
ZeroTo360Degs(
double
theta);
27
31
static
double
NegPiToPiRads(
double
theta);
32
36
static
double
GetAverage(vector<double> numbers);
37
39
static
double
Deadzone
(
double
inputValue,
double
deadzone)
40
{
41
// If the input is small return 0
42
return
abs(inputValue) <= deadzone ? 0 : inputValue;
43
}
44
};
std
STL namespace.
Constants.h
Util::Deadzone
static double Deadzone(double inputValue, double deadzone)
If an inputValue is smaller than its deadzone, returns 0, otherwise returns the inputValue.
Definition:
Util.h:39
Util
Definition:
Util.h:9
src
main
include
common
Util.h
Generated on Fri Aug 20 2021 01:20:35 for FRC Paradigm Shift #1259 by
1.8.11