-
Notifications
You must be signed in to change notification settings - Fork 1
/
stuff.h
33 lines (27 loc) · 960 Bytes
/
stuff.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
#pragma once
void init_trig(void);
float angle_to_radians(int angle);
int radians_to_angle(float angle);
fixed angle_to_fixed(int angle);
int grand(int number);
int crandom(int number);
int turn_towards_angle(int angle, int tangle, int turning);
int turn_towards_xy(int x1, int y1, int x2, int y2, int angle, int turning);
int pulsate(int speed, int amount, int county);
int angle_difference(int a1, int a2);
void error_message_out(const char *errm);
int delta_turn_towards_angle(int angle, int tangle, int turning);
int delta_turn_towards_xy(int x1, int y1, int x2, int y2, int angle, int turning);
int pos_or_neg(int a);
int odd_even(int v);
char coin(void);
extern float cos_table [ANGLE_1];
extern float sin_table [ANGLE_1];
inline static int xpart(int angle, int length)
{
return (cos_table [angle & 1023] * length);
}
inline static int ypart(int angle, int length)
{
return (sin_table [angle & 1023] * length);
}