-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathradian.h
35 lines (31 loc) · 905 Bytes
/
radian.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef RADIAN_H
#define RADIAN_H
#include "math.h"
#include "vector2.h"
//this class takes a degree value
//it stores the degree and calculate the radian
class Radian {
public:
void normalize();
double radVal;
Radian(double); // Construct from degrees
Radian(const Radian&); // Copy constructor
Radian();
double toRad();
double toDegrees();
Radian operator*(double);
Radian operator+(double);
Radian operator-(double);
Radian operator/(double);
Radian operator*(Radian);
Radian operator+(Radian);
Radian operator-(Radian);
Radian& operator=(const Radian&);
void add(Radian amount);
void subtract(Radian amount);
void add(double amount);
void subtract(double amount);
Vector2 toVector2();
bool between(Radian, Radian);
};
#endif