Skip to content

Commit

Permalink
Adjust numtype in viz utils
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Aug 16, 2024
1 parent 47f0e23 commit b672598
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ext/MeshesMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using LinearAlgebra
using CoordRefSystems
using Colorfy

using Unitful: numtype
using Meshes: lentype
using CoordRefSystems: Projected

import TransformsBase as TB
Expand Down
4 changes: 2 additions & 2 deletions ext/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ function asmakie(poly::Polygon)
end
end

asmakie(p::Point) = Makie.Point{embeddim(p),Float32}(ustrip.(Tuple(to(p))))
asmakie(p::Point) = Makie.Point{embeddim(p),numtype(lentype(p))}(ustrip.(Tuple(to(p))))

asmakie(v::Vec) = Makie.Vec{length(v),Float32}(ustrip.(Tuple(v)))
asmakie(v::Vec) = Makie.Vec{length(v),numtype(eltype(v))}(ustrip.(Tuple(v)))

0 comments on commit b672598

Please sign in to comment.