Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. 225 void printPoi(poi myPoi[], int size)
  2. 226 {
  3. 227 printf("\nx = ");
  4. 228
  5. 229 // x
  6. 230 for(int i = 0; i < size; i++)
  7. 231 {
  8. 232 if(myPoi[i].xPlus)
  9. 233 {
  10. 234 printf("+");
  11. 235 }
  12. 236 else
  13. 237 {
  14. 238 printf("-");
  15. 239 }
  16. 240 // complicated maths
  17. 241 printf("%0.1lf*sin(%d*theta)", myPoi[i].radius, myPoi[i].factor);
  18. 242 }
  19. 243
  20. 244 printf("\ny = "); // y
  21. 245 for(int x = 0; x < size; x++)
  22. 246 {
  23. 247 if(myPoi[x].yPlus) // sign
  24. 248 {
  25. 249 printf("+");
  26. 250 }
  27. 251 else
  28. 252 {
  29. 253 printf("-"); // sign
  30. 238 printf("-");
  31. 239 }
  32. 240 // complicated maths
  33. 241 printf("%0.1lf*sin(%d*theta)", myPoi[i].radius, myPoi[i].factor);
  34. 242 }
  35. 243
  36. 244 printf("\ny = "); // y
  37. 245 for(int x = 0; x < size; x++)
  38. 246 {
  39. 247 if(myPoi[x].yPlus) // sign
  40. 248 {
  41. 249 printf("+");
  42. 250 }
  43. 251 else
  44. 252 {
  45. 253 printf("-"); // sign
  46. 254 }
  47. 255
  48. 256 // complicated maths
  49. 257 printf("%0.1lf*cos(%d*theta)", myPoi[x].radius, myPoi[x].factor);
  50. 258 }
  51. 259 printf("\n");
  52. 260 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement