Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
Removing functions zero3 and one3.
Browse files Browse the repository at this point in the history
Fixes #157

removed lastrow function and inlined it since it was only used in one place.
  • Loading branch information
BrianGun committed Apr 29, 2021
1 parent 4675a4c commit 3a9910d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Geometry/Transform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ Transform(rotation::AbstractArray{S,2}, translation::AbstractArray{S,1})
Transform{T} = SMatrix{4,4,T,16}
export Transform

lastrow(::Type{T}) where{T<:Real} = SMatrix{1,4,T}(zero(T),zero(T),zero(T),one(T))

# for compatability ith the "old" RigidBodyTransform
"""
identitytransform([S::Type]) -> Transform{S}
Expand Down Expand Up @@ -179,7 +177,7 @@ end
Costruct a transform from the input columns.
"""
function Transform(colx::Vec3{T}, coly::Vec3{T}, colz::Vec3{T}, colw::Vec3{T} = zero(Vec3{T})) where {T<:Real}
return vcat(hcat(colx,coly,colz,colw),lastrow(T))
return vcat(hcat(colx,coly,colz,colw),SMatrix{1,4,T}(zero(T),zero(T),zero(T),one(T)) )
end


Expand Down

0 comments on commit 3a9910d

Please sign in to comment.