Skip to content

Commit

Permalink
robust typing for ParallelogramCoil
Browse files Browse the repository at this point in the history
  • Loading branch information
orso82 committed Oct 25, 2024
1 parent 31ec312 commit dc8ac48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ end
Construct a ParallelogramCoil
"""
ParallelogramCoil(R, Z, ΔR, ΔZ, θ1, θ2, current=0.0; resistance=0.0, turns=1) = ParallelogramCoil(R, Z, ΔR, ΔZ, θ1, θ2, current, resistance, turns)
function ParallelogramCoil(R, Z, ΔR, ΔZ, θ1, θ2, current=0.0; resistance=0.0, turns=1)
R, Z, ΔR, ΔZ, θ1, θ2 = promote(R, Z, ΔR, ΔZ, θ1, θ2)
ParallelogramCoil(R, Z, ΔR, ΔZ, θ1, θ2, current, resistance, turns)
end

area(C::ParallelogramCoil) = area(C.ΔR, C.ΔZ, C.θ1, C.θ2)

Expand Down

0 comments on commit dc8ac48

Please sign in to comment.