using System; using Science.Mathematics; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter03 { /// /// Example01: Polar Coordinates /// The Cartesian coordinates of a point in the xy plane /// are (x, y) = (-3.50, -2.50) m, as shown in Figure 3.3. /// Find the polar coordinates of this point. /// public class Example01 { public Example01() { } private string result; public string Result { get{return result;} } public void Compute() { Complex c = new Complex(-3.5,-2.5); double r = c.Abs; double theta = c.Arg; result += r.ToString()+" "+ Convert.ToString(theta*180/Math.PI)+" "; result += Convert.ToString(r*Math.Cos(theta))+" "+ Convert.ToString(r*Math.Sin(theta)); } } } // 4.30116263352131 215.537677791974 -3.5 -2.5