Skip to content

Commit c4996fe

Browse files
authored
Fix #201
1 parent 02ed799 commit c4996fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/primitives/spheres.jl

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ An alias for a HyperSphere of dimension 3. (i.e. `HyperSphere{3, T}`)
2424
const Sphere{T} = HyperSphere{3,T}
2525

2626
HyperSphere{N}(p::Point{N,T}, number) where {N,T} = HyperSphere{N,T}(p, convert(T, number))
27+
HyperSphere{N}(number::T) where {N,T <: Number} = HyperSphere{N,T}(Point{N, T}(zero(T)), number)
28+
HyperSphere{N,T}(number::T) where {N,T} = HyperSphere{N,T}(Point{N, T}(zero(T)), number)
29+
2730

2831
widths(c::HyperSphere{N,T}) where {N,T} = Vec{N,T}(radius(c) * 2)
2932
radius(c::HyperSphere) = c.r

0 commit comments

Comments
 (0)