HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
Loading...
Searching...
No Matches
util.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cmath>
4namespace hololib {
5/**
6 * @brief Helper utility to calculate the shortest path between two angles.
7 *
8 * @param target The desired angle in degrees.
9 * @param current The current angle in degrees.
10 * @return float The minimal error difference [-180, 180].
11 */
12float getAngleError(float target, float current);
13
14float vexToMathRadians(float vexDegrees);
15
16}; // namespace hololib
float getAngleError(float target, float current)
Helper utility to calculate the shortest path between two angles.
float vexToMathRadians(float vexDegrees)