Skip to content

Primitive/Operation Requests #45

@ghost

Description

This is probably a dumb question, but my knowledge of Julia is limited. I'm trying to do this code:

using Descartes                                                                                                                   
                                                                                                                                  
function create_horse_shape()                                                                                                     
    body_length = 1.0                                                                                                             
    body_width = 1/2 * body_length                                                                                                
    body_thickness = 1/12 * body_length                                                                                           
    body_cutout_circle_radius = body_length / 2                                                                                   
    body_cutout_circle =  Circle(body_cutout_circle_radius)                                                                       
end

when I run create_horse_shape I get this error:

ERROR: MethodError: no method matching Circle(::Float64)
Closest candidates are:
  Circle(::T, ::StaticArrays.SArray{Tuple{3,3},T,2,9}, ::StaticArrays.SArray{Tuple{3,3},T,2,9}) where T at /home/stewart/.julia/dev/Descartes/src/types.jl:16
Stacktrace:
 [1] create_horse_shape() at ./REPL[2]:6
 [2] top-level scope at none:0

How should I use Circle? Thanks.

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