Exemplo n.º 1
0
            public static Coordinates.Spherical From(Coordinates.Cartesian3D point)
            {
                var r     = Sqrt(Pow(point.X, 2) + Pow(point.Y, 2) + Pow(point.Z, 2));
                var phi   = AngleMath.Atan2(point.Y, point.X);
                var theta = AngleMath.Atan2(Sqrt(Pow(point.X, 2) + Pow(point.Y, 2)), point.Z);

                return(new Coordinates.Spherical(
                           phi: phi,
                           theta: theta,
                           r: r));
            }