Skip to content

Commit b672598

Browse files
committed
Adjust numtype in viz utils
1 parent 47f0e23 commit b672598

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ext/MeshesMakieExt.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ using LinearAlgebra
1212
using CoordRefSystems
1313
using Colorfy
1414

15+
using Unitful: numtype
16+
using Meshes: lentype
1517
using CoordRefSystems: Projected
1618

1719
import TransformsBase as TB

ext/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ function asmakie(poly::Polygon)
4343
end
4444
end
4545

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

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

0 commit comments

Comments
 (0)