Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _USE_MATH_DEFINES
- #include "Strophoid.h"
- #include <cmath>
- float fi = fi * (M_PI / 180);
- float Strophoid::getCoord()
- {
- return y = x * sqrt((a + x) / (a - x));
- }
- float Strophoid::getDist()
- {
- return d = -(a * cos(2 * fi) / cos(fi));
- }
- float Strophoid::getRad()
- {
- return r = a * sqrt(2);
- }
- float Strophoid::getSquare()
- {
- return s = 2 * pow(a, 2) - (1 / 2) * M_PI * pow(a, 2);
- }
- float Strophoid::getVolume()
- {
- return v = M_PI * pow(a, 3) * (2 * log(2) - 4 / 3);
- }
- float Strophoid::getSquareOuOv()
- {
- return souov = 2 * pow(a, 2) + 1 / 2 * M_PI * pow(a, 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement