diff --git a/src/frames.jl b/src/frames.jl index cb66b23..7629661 100644 --- a/src/frames.jl +++ b/src/frames.jl @@ -81,7 +81,7 @@ Base.getindex(frames::Frames{T}, i::Integer) where T = Frame{T}(QuatRotation(fra Base.:(==)(frames1::Frames, frames2::Frames) = all(f1 == f2 for (f1, f2) in zip(frames1, frames2)) -function (frames::Frames{T})(coords::AbstractMatrix{T}) where T <: Real +function (frames::Frames{T})(coords::AbstractMatrix{<:Real}) where T <: Real coords = T.(coords) coords_centroid = centroid(coords) return stack((f -> f(coords, coords_centroid)).(frames)) diff --git a/test/frames.jl b/test/frames.jl index 0e63ced..88062b5 100644 --- a/test/frames.jl +++ b/test/frames.jl @@ -8,7 +8,7 @@ import Rotations: QuatRotation, params params(QuatRotation([0 0 1; 1 0 0; 0 1 0])^2);; params(QuatRotation([0 0 1; 1 0 0; 0 1 0])^3);; ], - Float64[ + [ 0 10 100; 0 0 0; 0 0 0; @@ -23,7 +23,7 @@ import Rotations: QuatRotation, params @test size(frames) == (3,) @test frames[1] == Frame{Float64}(QuatRotation([0 0 1; 1 0 0; 0 1 0]), [0.0, 0.0, 0.0]) - standard_coords = Float64[3 1 -4; 1 -1 0; 0 0 0] + standard_coords = [3 1 -4; 1 -1 0; 0 0 0] backbone = Backbone(frames, standard_coords) @test backbone.coords == [