Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #define _USE_MATH_DEFINES
  2. #include "Strophoid.h"
  3. #include <cmath>
  4.  
  5. float fi = fi * (M_PI / 180);
  6.  
  7. float Strophoid::getCoord()
  8. {
  9.     return y = x * sqrt((a + x) / (a - x));
  10. }
  11.  
  12. float Strophoid::getDist()
  13. {
  14.     return d = -(a * cos(2 * fi) / cos(fi));
  15. }
  16.  
  17. float Strophoid::getRad()
  18. {
  19.     return r = a * sqrt(2);
  20. }
  21.  
  22. float Strophoid::getSquare()
  23. {
  24.     return s = 2 * pow(a, 2) - (1 / 2) * M_PI * pow(a, 2);
  25. }
  26.  
  27. float Strophoid::getVolume()
  28. {
  29.     return v = M_PI * pow(a, 3) * (2 * log(2) - 4 / 3);
  30. }
  31.  
  32. float Strophoid::getSquareOuOv()
  33. {
  34.     return souov = 2 * pow(a, 2) + 1 / 2 * M_PI * pow(a, 2);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement