#include "rotate.h"
#include "math.h"
Defines | |
#define | PI (3.14159) |
#define | CIRC_45 (PI/4) |
#define | CIRC_45H (CIRC_45/2) |
#define | CIRC_F1 (CIRC_45H) |
#define | CIRC_F2 (CIRC_F1 + CIRC_45) |
#define | CIRC_F3 (CIRC_F2 + CIRC_45) |
#define | CIRC_F4 (CIRC_F3 + CIRC_45) |
#define | CIRC_B1 (-CIRC_45H) |
#define | CIRC_B2 (CIRC_B1 - CIRC_45) |
#define | CIRC_B3 (CIRC_B2 - CIRC_45) |
#define | CIRC_B4 (CIRC_B3 - CIRC_45) |
Functions | |
void | rotate_setup () |
void | xy_scaling (int dir, float *x, float *y) |
void | xy_components (int dir, float speed, float *x, float *y) |
int | dir_opposite (int dir) |
int | dir_cwise (int dir) |
int | dir_ccwise (int dir) |
int | dir_after_rotations (int dir, int rot) |
int | dir_covered (int dir, int otherdir) |
int | xy_to_dir (float x, float y) |
Variables | |
float | x_scaling [DIR_SIZE] |
float | y_scaling [DIR_SIZE] |
float | dir_opposite_table [DIR_SIZE] |
float | dir_cwise_table [DIR_SIZE] |
float | dir_ccwise_table [DIR_SIZE] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
see note below |
|
|
|
|
|
|
|
|
|
|
|
uses atan2: slow |
|
|
|
|
|
|
|
|
|
|