JuliaGeometry / JuliaGeometry/GeometryBasics.jl

Intersections of lines with Int parameters crash

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
215
Forks
64
Avg merge
3d 18h
Merged PRs (30d)
2

Description

using GeometryBasics
intersects(Line(Point(-1, 0), Point(1, 0)), Line(Point(0, -1), Point(0, 1)))

crashes with

julia> intersects(Line(Point(-1, 0), Point(1, 0)), Line(Point(0, -1), Point(0, 
1)))
ERROR: LoadError: MethodError: no method matching Int64(::Irrational{:π})      
Closest candidates are:
  (::Type{T})(::T) where T<:Number at C:\Users\racinsky\AppData\Local\Programs\Julia-1.7.0\share\julia\base\boot.jl:770
  (::Type{T})(::AbstractChar) where T<:Union{Int32, Int64} at C:\Users\racinsky\AppData\Local\Programs\Julia-1.7.0\share\julia\base\char.jl:51
  (::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number} at C:\Users\racinsky\AppData\Local\Programs\Julia-1.7.0\share\julia\base\char.jl:50        
  ...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the provided Julia example using intersects with integer-valued Line points, then trace the intersects(Line, Line) entry point in GeometryBasics.jl. Done should mean the example no longer raises MethodError: Int64(::Irrational{:π}); the issue does not mention a test file or implementation file.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.