main.c 373 B

1234567891011121314
  1. #include <stdio.h>
  2. #include "geometry.h"
  3. int main(int argc, char** argv) {
  4. cartesian_pos_2d_t cartesian_pos;
  5. cartesian_pos.x = 100;
  6. cartesian_pos.y = 200;
  7. polar_pos_2d_t polar_pos =
  8. convert_to_2d_polar_pos(&cartesian_pos);
  9. printf("Polar Position: Length: %f, Theta: %f (deg)\n",
  10. polar_pos.length, polar_pos.theta);
  11. return 0;
  12. }