Пример #1
0
 /// <summary>
 /// Transforms a point in polar coordinates to cartesian coordinates.
 /// </summary>
 /// <param name="value">The point to transform.</param>
 /// <returns>The cartesian coordinates of value.</returns>
 public static Point2d PolarToCartesian(PolarCoordinate value)
 {
     return(new Point2d(
                value.Rho * Functions.Cos(value.Theta), value.Rho * Functions.Sin(value.Theta)));
 }
Пример #2
0
 /// <summary>
 /// Creates a complex number from a point's polar coordinates.
 /// </summary>
 /// <param name="coordinate">The polar coordinate</param>
 public static Complex FromPolarCoordinates(Geometry.PolarCoordinate coordinate)
 {
     return(new Complex(
                Functions.Cos(coordinate.Theta) * coordinate.Rho,
                Functions.Sin(coordinate.Theta) * coordinate.Rho));
 }