Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing convert? #14

Open
bc0n opened this issue Jul 19, 2023 · 0 comments
Open

missing convert? #14

bc0n opened this issue Jul 19, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bc0n
Copy link
Member

bc0n commented Jul 19, 2023

  pa = Point(3u"m", 4u"m")
  pb = Point(5u"m", 4.8u"m")
  vab = Vector2D(pa, pb)  
  @show aAB = Geometry2D.angle(vab)

ERROR: MethodError: no method matching (Union{Unitful.Quantity{T, NoDims, Unitful.FreeUnits{(rad,), NoDims, nothing}}, Unitful.Quantity{T, NoDims, Unitful.FreeUnits{(°,), NoDims, nothing}}} where T)(::Float64)
Closest candidates are:
(::Type{T})(::T) where T<:Number at boot.jl:772
(::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number} at char.jl:50
(::Type{T})(::Base.TwicePrecision) where T<:Number at twiceprecision.jl:266
...
Stacktrace:
[1] convert(#unused#::Type{Union{Unitful.Quantity{T, NoDims, Unitful.FreeUnits{(rad,), NoDims, nothing}}, Unitful.Quantity{T, NoDims, Unitful.FreeUnits{(°,), NoDims, nothing}}} where T}, x::Float64)
@ Base .\number.jl:7
[2] angle(v::Geometry2D.Vector2D)
@ Geometry2D \src\Vector2D.jl:49

@bc0n bc0n added the bug Something isn't working label Jul 19, 2023
@bc0n bc0n self-assigned this Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant