Skip to content

Commit

Permalink
Merge pull request #253 from JuliaRobotics/23Q4/enh/setpointmani
Browse files Browse the repository at this point in the history
setPointsMani! of array from point
  • Loading branch information
Affie authored Oct 11, 2023
2 parents 1c3eb2e + 6e0a5c8 commit f5ab9c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ function setPointsMani!(dest::AbstractArray{T}, src::AbstractArray{U}, destIdx,
end
end

function setPointsMani!(dest::AbstractArray{T}, src::AbstractArray{U}, destIdx) where {T <: AbstractArray, U <: Real}
if isbitstype(T)
dest[destIdx] = src
else
setPointsMani!(dest[destIdx], src)
end
end


#TODO ArrayPartition should work for now as it's an AbstractVector, but it won't remain mutable
setPointsMani!(dest::AbstractVector, src::AbstractVector) = (dest .= src)
Expand Down

0 comments on commit f5ab9c9

Please sign in to comment.