@@ -154,17 +154,17 @@ Return `Point3D(x, y, z)` corresponding to `(ρ, θ, ϕ)`:
154154
155155- θ is the azimuthal angle (the longitude) 0 is +x, π is -x, 2π is +x
156156
157- - ϕ is the polar angle (the latitude ) 0 is North Pole, π is South Pole
157+ - ϕ is the polar angle (the colatitude ) 0 is North Pole, π is South Pole
158158
159159There are two major conventions for spherical coordinate notation.
160160
161161In physics books:
162162
163- (ρ, θ, φ) gives the radial distance, polar angle (latitude ), and azimuthal angle (longitude)
163+ (ρ, θ, φ) gives the radial distance, polar angle (colatitude ), and azimuthal angle (longitude)
164164
165165In mathematics books:
166166
167- (ρ, θ , φ ) gives the radial distance, azimuthal angle (longitude), and polar angle (latitude )
167+ (ρ, θ , φ ) gives the radial distance, azimuthal angle (longitude), and polar angle (colatitude )
168168
169169So we're using the mathematics one here.
170170"""
@@ -185,7 +185,7 @@ sphericaltocartesian((ρ, θ, ϕ)) = sphericaltocartesian(ρ, θ, ϕ)
185185"""
186186 cartesiantospherical(x, y, z)
187187
188- Return `(ρ, θ, ϕ)` (radius, longitude, latitude ) of the Point3D(x, y, z).
188+ Return `(ρ, θ, ϕ)` (radius, longitude, colatitude ) of the Point3D(x, y, z).
189189"""
190190function cartesiantospherical (x, y, z)
191191 ρ = sqrt (x^ 2 + y^ 2 + z^ 2 )
197197"""
198198 cartesiantospherical(pt::Point3D)
199199
200- Return `(ρ, θ, ϕ)` (radius, longitude, latitude ) of `pt`.
200+ Return `(ρ, θ, ϕ)` (radius, longitude, colatitude ) of `pt`.
201201"""
202202cartesiantospherical (pt:: Point3D ) = cartesiantospherical (pt. x, pt. y, pt. z)
203203
0 commit comments