Skip to content

Commit

Permalink
Merge pull request #27 from FugroRoames/julia-0.6-fixes
Browse files Browse the repository at this point in the history
Julia 0.6 fixes
  • Loading branch information
c42f authored Apr 11, 2017
2 parents 62ba22e + 2f355b4 commit 9f3aa6b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
julia 0.5
Compat 0.17.0
StaticArrays
Rotations 0.3.0
3 changes: 3 additions & 0 deletions src/CoordinateTransformations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ __precompile__()

module CoordinateTransformations

using Compat
using StaticArrays

import Compat.∘

using Rotations
export RotMatrix, Quat, SpQuat, AngleAxis, RodriguesVec,
RotX, RotY, RotZ,
Expand Down
2 changes: 1 addition & 1 deletion src/affine.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abstract AbstractAffineMap <: Transformation
@compat abstract type AbstractAffineMap <: Transformation end

"""
Translation(v) <: AbstractAffineMap
Expand Down
5 changes: 2 additions & 3 deletions src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ transformation on the correct data types by overloading the call method, and
usually would have the corresponding inverse transformation defined by `Base.inv()`.
Efficient compositions can optionally be defined by `compose()` (equivalently `∘`).
"""
abstract Transformation
@compat abstract type Transformation end

"""
The `IdentityTransformation` is a singleton `Transformation` that returns the
Expand Down Expand Up @@ -45,6 +45,7 @@ function Base.isapprox(trans1::ComposedTransformation, trans2::ComposedTransform
isapprox(trans1.t1, trans2.t1; kwargs...) && isapprox(trans1.t2, trans2.t2; kwargs...)
end

const compose =

"""
compose(trans1, trans2)
Expand All @@ -64,8 +65,6 @@ compose(trans::IdentityTransformation, ::IdentityTransformation) = trans
compose(::IdentityTransformation, trans::Transformation) = trans
compose(trans::Transformation, ::IdentityTransformation) = trans

const = compose # TODO watch JuliaLang/julia#17184 and #17155 for v0.5 compatibility


"""
inv(trans::Transformation)
Expand Down
2 changes: 1 addition & 1 deletion test/affine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CoordinateTransformations.transform_deriv(::SquareMe, x0) = diagm(2*x0)

# Transform
@test trans(x) === SVector(3.0, 1.0)
@test trans(collect(x)) === SVector(3.0, 1.0)
@test trans(collect(x)) == [3.0, 1.0]

# Transform derivative
m1 = transform_deriv(trans, x)
Expand Down

0 comments on commit 9f3aa6b

Please sign in to comment.