Skip to content

Strict typing #19

@ffreyer

Description

@ffreyer

voronoicells(points, rect) seems to be pretty strict on the type of points. A Point2f0 vector fails with

MethodError: no method matching map_to_computation_rectangle(::Vector{Point{2, Float32}}, ::Rectangle{Point2{Float64}}, ::Rectangle{GeometricalPredicates.Point2D})
Closest candidates are:
  map_to_computation_rectangle(::Vector{T}, ::Rectangle{T}, ::Rectangle) where T at ~/.julia/packages/VoronoiCells/PjjQG/src/Rectangle.jl:90

Stacktrace:
 [1] VoronoiCells.PointCollection(points::Vector{Point{2, Float32}}, rect::Rectangle{Point2{Float64}})
   @ VoronoiCells ~/.julia/packages/VoronoiCells/PjjQG/src/Cells.jl:18
 [2] voronoicells(points::Vector{Point{2, Float32}}, rect::Rectangle{Point2{Float64}})
   @ VoronoiCells ~/.julia/packages/VoronoiCells/PjjQG/src/Cells.jl:98

Same with Point2{Int64}.

I'm also wondering why this package implements its own Rectangle. Is the Rect in GeometryBasics missing functionality?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions