Skip to content

Commit 362168b

Browse files
committed
Line wrapping
1 parent 7aab011 commit 362168b

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

src/affine.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ end
120120
"""
121121
AffineMap(trans::Transformation, x0)
122122
123-
Create an Affine transformation corresponding to the differential transformation
123+
Create an affine transformation corresponding to the differential transformation
124124
of `x0 + dx` according to `trans`, i.e. the Affine transformation that is
125125
locally most accurate in the vicinity of `x0`.
126126
"""

src/coordinatesystems.jl

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ function Spherical(r, θ, ϕ)
129129
end
130130

131131
Base.show(io::IO, x::Spherical) = print(io, "Spherical(r=$(x.r), θ=$(x.θ) rad, ϕ=$(x.ϕ) rad)")
132-
Base.isapprox(p1::Spherical, p2::Spherical; kwargs...) = isapprox(p1.r, p2.r; kwargs...) && isapprox(p1.θ, p2.θ; kwargs...) && isapprox(p1.ϕ, p2.ϕ; kwargs...)
132+
Base.isapprox(p1::Spherical, p2::Spherical; kwargs...) =
133+
isapprox(p1.r, p2.r; kwargs...) && isapprox(p1.θ, p2.θ; kwargs...) && isapprox(p1.ϕ, p2.ϕ; kwargs...)
133134

134135
"""
135136
Cylindrical(r, θ, z)
@@ -151,7 +152,8 @@ function Cylindrical(r, θ, z)
151152
end
152153

153154
Base.show(io::IO, x::Cylindrical) = print(io, "Cylindrical(r=$(x.r), θ=$(x.θ) rad, z=$(x.z))")
154-
Base.isapprox(p1::Cylindrical, p2::Cylindrical; kwargs...) = isapprox(p1.r, p2.r; kwargs...) && isapprox(p1.θ, p2.θ; kwargs...) && isapprox(p1.z, p2.z; kwargs...)
155+
Base.isapprox(p1::Cylindrical, p2::Cylindrical; kwargs...) =
156+
isapprox(p1.r, p2.r; kwargs...) && isapprox(p1.θ, p2.θ; kwargs...) && isapprox(p1.z, p2.z; kwargs...)
155157

156158
"""
157159
SphericalFromCartesian()
@@ -217,7 +219,8 @@ function transform_deriv(::SphericalFromCartesian, x::AbstractVector)
217219
-fxy*cxy cxy zero(T);
218220
f*x[1] f*x[2] rxy/(r*r) ]
219221
end
220-
transform_deriv_params(::SphericalFromCartesian, x::AbstractVector) = error("SphericalFromCartesian has no parameters")
222+
transform_deriv_params(::SphericalFromCartesian, x::AbstractVector) =
223+
error("SphericalFromCartesian has no parameters")
221224

222225
function (::CartesianFromSpherical)(x::Spherical)
223226
sθ, cθ = sincos(x.θ)
@@ -231,7 +234,8 @@ function transform_deriv(::CartesianFromSpherical, x::Spherical{T}) where T
231234
*cϕ x.r**-x.r**sϕ ;
232235
zero(T) x.r * cϕ ]
233236
end
234-
transform_deriv_params(::CartesianFromSpherical, x::Spherical) = error("CartesianFromSpherical has no parameters")
237+
transform_deriv_params(::CartesianFromSpherical, x::Spherical) =
238+
error("CartesianFromSpherical has no parameters")
235239

236240
# Cartesian <-> Cylindrical
237241
function (::CylindricalFromCartesian)(x::AbstractVector)
@@ -251,7 +255,8 @@ function transform_deriv(::CylindricalFromCartesian, x::AbstractVector)
251255
-f*c c zero(T) ;
252256
zero(T) zero(T) one(T) ]
253257
end
254-
transform_deriv_params(::CylindricalFromCartesian, x::AbstractVector) = error("CylindricalFromCartesian has no parameters")
258+
transform_deriv_params(::CylindricalFromCartesian, x::AbstractVector) =
259+
error("CylindricalFromCartesian has no parameters")
255260

256261
function (::CartesianFromCylindrical)(x::Cylindrical)
257262
sθ, cθ = sincos(x.θ)
@@ -263,7 +268,8 @@ function transform_deriv(::CartesianFromCylindrical, x::Cylindrical{T}) where {T
263268
sθ x.r*zero(T) ;
264269
zero(T) zero(T) one(T) ]
265270
end
266-
transform_deriv_params(::CartesianFromPolar, x::Cylindrical) = error("CartesianFromCylindrical has no parameters")
271+
transform_deriv_params(::CartesianFromPolar, x::Cylindrical) =
272+
error("CartesianFromCylindrical has no parameters")
267273

268274
function (::CylindricalFromSpherical)(x::Spherical)
269275
sϕ, cϕ = sincos(x.ϕ)
@@ -274,7 +280,8 @@ function transform_deriv(::CylindricalFromSpherical, x::Spherical)
274280
M2 = transform_deriv(CartesianFromSpherical(), x)
275281
return M1*M2
276282
end
277-
transform_deriv_params(::CylindricalFromSpherical, x::Spherical) = error("CylindricalFromSpherical has no parameters")
283+
transform_deriv_params(::CylindricalFromSpherical, x::Spherical) =
284+
error("CylindricalFromSpherical has no parameters")
278285

279286
function (::SphericalFromCylindrical)(x::Cylindrical)
280287
Spherical(hypot(x.r,x.z),x.θ,atan(x.z,x.r))
@@ -284,7 +291,8 @@ function transform_deriv(::SphericalFromCylindrical, x::Cylindrical)
284291
M2 = transform_deriv(CartesianFromCylindrical(), x)
285292
return M1*M2
286293
end
287-
transform_deriv_params(::SphericalFromCylindrical, x::Cylindrical) = error("SphericalFromCylindrical has no parameters")
294+
transform_deriv_params(::SphericalFromCylindrical, x::Cylindrical) =
295+
error("SphericalFromCylindrical has no parameters")
288296

289297
Base.inv(::SphericalFromCartesian) = CartesianFromSpherical()
290298
Base.inv(::CartesianFromSpherical) = SphericalFromCartesian()

src/core.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ recenter(trans::Transformation, origin::Tuple) = recenter(trans, SVector(origin)
112112
A matrix describing how differentials on the parameters of `x` flow through to
113113
the output of transformation `trans`.
114114
"""
115-
transform_deriv(trans::Transformation, x) = error("Differential matrix of transform $trans with input $x not defined")
115+
transform_deriv(trans::Transformation, x) =
116+
error("Differential matrix of transform $trans with input $x not defined")
116117

117118
transform_deriv(::IdentityTransformation, x) = I
118119

@@ -130,9 +131,11 @@ end
130131
A matrix describing how differentials on the parameters of `trans` flow through
131132
to the output of transformation `trans` given input `x`.
132133
"""
133-
transform_deriv_params(trans::Transformation, x) = error("Differential matrix of parameters of transform $trans with input $x not defined")
134+
transform_deriv_params(trans::Transformation, x) =
135+
error("Differential matrix of parameters of transform $trans with input $x not defined")
134136

135-
transform_deriv_params(::IdentityTransformation, x) = error("IdentityTransformation has no parameters")
137+
transform_deriv_params(::IdentityTransformation, x) =
138+
error("IdentityTransformation has no parameters")
136139

137140
function transform_deriv_params(trans::ComposedTransformation, x)
138141
x2 = trans.t2(x)

0 commit comments

Comments
 (0)