Skip to content

Circle function not working with mixed units #228

@wschmail

Description

@wschmail

The function Circle(center::Point{T}, r::T) throws a MethodError when using different units or types, so I often have to add unit conversion which feels like a bug.

This works:

Circle(Point(1µm, 1µm), 1µm)
Circle(Point(1.0µm, 1µm), 1.0µm)

This doesn't work (MethodError):

Circle(Point(1µm, 1µm), 1.0µm)
Circle(Point(1.0µm, 1µm), 1µm)
Circle(Point(1µm, 1µm), 1nm)
Circle(Point(1µm, 1µm), 1.0nm)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions