#include #include #include "geometry.hpp" using namespace std; Point getCoords(Point center, double radius, double angle) { Point p; p.x = center.x + (radius * cos(angle)); p.y = center.y + (radius * sin(angle)); return p; } int main() { Point center(0,0); Point* ptr = new Point; { Point p = Point(1,0); printf("ANGLE = 0 - x: %.02f y: %.02f\n",p.x,p.y); } { Point p = getCoords(center,1,M_PI); printf("ANGLE = PI - x: %.02f y: %.02f\n",p.x,p.y); } { Point p = getCoords(center,1,PI / 2); printf("ANGLE = PI/2 - x: %.02f y: %.02f\n",p.x,p.y); } { Point p = getCoords(center,1,3 * PI / 2); printf("ANGLE = 3PI/2 - x: %.02f y: %.02f\n",p.x,p.y); } }