Clone of UAS2 @ https://github.com/drudgedance/uas2

calc_funcs.h 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. /* calc_funcs.h
  2. *
  3. * Header file for calc_funcs.c
  4. *
  5. * Ver 3.2 2002.05.25 Deryck Morales
  6. * <deryck@alumni.carnegiemellon.edu>
  7. * Nick Jong
  8. * <nkj@andrew.cmu.edu>
  9. */
  10. #ifndef _CALC_FUNCS_H_
  11. #define _CALC_FUNCS_H_
  12. #include <math.h>
  13. #define PAI 3.14159265
  14. int fix_angle(int angle);
  15. int calc_sup_angle(int dir1, int dir2);
  16. int calc_diff_angle(int x, int y);
  17. int calc_middle_angle(int dir1, int dir2);
  18. int deg_to_index_160(int val);
  19. int index_160_to_deg(int idx);
  20. int calc_vec_to_deg(int vx, int vy);
  21. void calc_XY_from_deg_val(int ,int , int *, int *);
  22. void calc_vertical_point_on_line(int px, int py, int lx, int ly, int ldir, int *result_x, int *result_y);
  23. void calc_rotation(int x, int y, int ang, int *nx, int *ny);
  24. #endif