Open LingyiZou opened 7 months ago
The results of the following function seem wrong to me,
function (::SphericalFromCartesian)(x::AbstractVector) length(x) == 3 || error("Spherical transform takes a 3D coordinate") Spherical(hypot(x[1], x[2], x[3]), atan(x[2], x[1]), atan(x[3], hypot(x[1], x[2]))) end
function (::SphericalFromCartesian)(x::AbstractVector) length(x) == 3 || error("Spherical transform takes a 3D coordinate")
Spherical(hypot(x[1], x[2], x[3]), atan(x[2], x[1]), atan(x[3], hypot(x[1], x[2])))
end
Should the fourth line be changed to this?
function (::SphericalFromCartesian)(x::AbstractVector) length(x) == 3 || error("Spherical transform takes a 3D coordinate") Spherical(hypot(x[1], x[2], x[3]), atan(x[2], x[1]), atan(hypot(x[1], x[2]), x[3])) end
Spherical(hypot(x[1], x[2], x[3]), atan(x[2], x[1]), atan(hypot(x[1], x[2]), x[3]))
The results of the following function seem wrong to me,
Should the fourth line be changed to this?