@@ -12,8 +12,6 @@ Polar(r::T, θ::A) where {T<:AbstractFloat, A<:Integer} = Polar(promote(r, θ)..
12
12
Polar (r:: T , θ:: A ) where {T<: Integer , A<: AbstractFloat } = Polar (promote (r, θ)... )
13
13
Base. show (io:: IO , x:: Polar ) = print (io, " Polar(r=$(x. r) , θ=$(x. θ) rad)" )
14
14
Base. isapprox (p1:: Polar , p2:: Polar ; kwargs... ) = isapprox (p1. r, p2. r; kwargs... ) && isapprox (p1. θ, p2. θ; kwargs... )
15
- Base. eltype (:: Polar{T,A} ) where {T,A} = promote_type (T, A)
16
- Base. eltype (:: Type{Polar{T,A}} ) where {T,A} = promote_type (T, A)
17
15
18
16
" `PolarFromCartesian()` - transformation from `AbstractVector` of length 2 to `Polar` type"
19
17
struct PolarFromCartesian <: Transformation ; end
@@ -78,8 +76,6 @@ Spherical(r::T, θ::A, ϕ::A) where {T<:AbstractFloat, A<:Integer} = Spherical(p
78
76
Spherical (r:: T , θ:: A , ϕ:: A ) where {T<: Integer , A<: AbstractFloat } = Spherical (promote (r, θ, ϕ)... )
79
77
Base. show (io:: IO , x:: Spherical ) = print (io, " Spherical(r=$(x. r) , θ=$(x. θ) rad, ϕ=$(x. ϕ) rad)" )
80
78
Base. isapprox (p1:: Spherical , p2:: Spherical ; kwargs... ) = isapprox (p1. r, p2. r; kwargs... ) && isapprox (p1. θ, p2. θ; kwargs... ) && isapprox (p1. ϕ, p2. ϕ; kwargs... )
81
- Base. eltype (:: Spherical{T,A} ) where {T,A} = promote_type (T, A)
82
- Base. eltype (:: Type{Spherical{T,A}} ) where {T,A} = promote_type (T, A)
83
79
84
80
"""
85
81
Cylindrical(r, θ, z) - 3D cylindrical coordinates
@@ -95,8 +91,6 @@ Cylindrical(r::T1, θ::A, z::T2) where {T1<:AbstractFloat, T2<:Integer, A<:Abstr
95
91
Cylindrical (r:: T1 , θ:: A , z:: T2 ) where {T1<: Integer , T2<: AbstractFloat , A<: AbstractFloat } = Cylindrical (promote (r, θ, z)... )
96
92
Base. show (io:: IO , x:: Cylindrical ) = print (io, " Cylindrical(r=$(x. r) , θ=$(x. θ) rad, z=$(x. z) )" )
97
93
Base. isapprox (p1:: Cylindrical , p2:: Cylindrical ; kwargs... ) = isapprox (p1. r, p2. r; kwargs... ) && isapprox (p1. θ, p2. θ; kwargs... ) && isapprox (p1. z, p2. z; kwargs... )
98
- Base. eltype (:: Cylindrical{T,A} ) where {T,A} = promote_type (T, A)
99
- Base. eltype (:: Type{Cylindrical{T,A}} ) where {T,A} = promote_type (T, A)
100
94
101
95
" `SphericalFromCartesian()` - transformation from 3D point to `Spherical` type"
102
96
struct SphericalFromCartesian <: Transformation ; end
0 commit comments