RoboidControl for Arduino
Loading...
Searching...
No Matches
Angle.h
Go to the documentation of this file.
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0.If a copy of the MPL was not distributed with this
3// file, You can obtain one at https ://mozilla.org/MPL/2.0/.
4
5#ifndef ANGLE_H
6#define ANGLE_H
7
8class Angle {
9 public:
10 const static float Rad2Deg;
11 const static float Deg2Rad;
12
13 static float Normalize(float angle);
14 static float Clamp(float angle, float min, float max);
15 static float Difference(float a, float b);
16 static float MoveTowards(float fromAngle, float toAngle, float maxAngle);
17
18 static float CosineRuleSide(float a, float b, float gamma);
19 static float CosineRuleAngle(float a, float b, float c);
20
21 static float SineRuleAngle(float a, float beta, float c);
22};
23
24#endif
Definition Angle.h:8
static const float Rad2Deg
Definition Angle.h:10
static float Clamp(float angle, float min, float max)
Definition Angle.cpp:23
static float Normalize(float angle)
Definition Angle.cpp:12
static float SineRuleAngle(float a, float beta, float c)
Definition Angle.cpp:68
static const float Deg2Rad
Definition Angle.h:11
static float MoveTowards(float fromAngle, float toAngle, float maxAngle)
Definition Angle.cpp:34
static float CosineRuleAngle(float a, float b, float c)
Definition Angle.cpp:53
static float CosineRuleSide(float a, float b, float gamma)
Definition Angle.cpp:41
static float Difference(float a, float b)
Definition Angle.cpp:29