[MOD] used same solution for circle
This commit is contained in:
parent
b993fec341
commit
5306105102
|
@ -22,6 +22,12 @@ end
|
|||
|
||||
typealias Point Union{Tuple{Float64,Float64}, Tuple{Int64,Int64}}
|
||||
|
||||
"Create circle from point and radius"
|
||||
function Circle(p::Point,radius)
|
||||
px,py = p
|
||||
Circle(px,py,radius)
|
||||
end
|
||||
|
||||
|
||||
"Create rectangle from to points `p` at the top left corner and `q` at the lower right corner"
|
||||
function Rectangle(p::Point,q::Point)
|
||||
|
|
|
@ -2,9 +2,9 @@ include("./11_DefiningTypes.jl")
|
|||
include("./11_points.jl")
|
||||
|
||||
r1 = Rectangle(D,B)
|
||||
c1 = Circle(A...,2)
|
||||
c1 = Circle(A,2)
|
||||
r2 = Rectangle(K,I)
|
||||
c2 = Circle(F...,1)
|
||||
c2 = Circle(F,1)
|
||||
|
||||
g1 = group(c1,r1)
|
||||
g2 = group(c2,r2)
|
||||
|
|
Loading…
Reference in New Issue