Write a function named xytopolar that has 2 double value


Program: Write a function named "XYtoPolar" that has 2 double value parameters and 2 double reference parameters that converts x,y coordinates to polar coordinates. The prototype is: void XYtoPolar(double x, double y, double* angle, double* radius);

Look up in a math book or on the Internet how to do the conversion mathematically and code that into your program.

The effect of the function is to take arbitrary values for x and y representing the coordinates of a point on the x,y plane and sets the variables pointed to by angle and radius to the corresponding polar coordinates of the same point, with the angle in radians, not degrees.

For case, the point x=1, y=1 has polar coordinates angle=0.785398163, radius = 1.41421356237.

Hint: the C math function atan(x) returns the inverse tangent of x.

Please keep it simple and short and no copy and paste or at least help me get started?

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a function named xytopolar that has 2 double value
Reference No:- TGS0957009

Expected delivery within 24 Hours