Skip to content

Commit d1ce83e

Browse files
committed
Fix Constant Constructors
1 parent 4050a64 commit d1ce83e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/b-splines/constant.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ end
3838

3939
# Default to Nearest and Throw{OnGrid}
4040
Constant() = Constant{Nearest}()
41+
Constant(bc::BC) where {BC <: BoundaryCondition} = Constant{Nearest}(bc)
42+
Constant(::Type{T}) where T <: ConstantInterpType = Constant{T}()
4143
Constant{T}() where {T<:ConstantInterpType} = Constant{T,Throw{OnGrid}}(Throw(OnGrid()))
4244
Constant{T}(bc::BC) where {T<:ConstantInterpType,BC<:BoundaryCondition} = Constant{T,BC}(bc)
43-
Constant(p::Periodic) where {T<:ConstantInterpType} = Constant{Nearest}(p)
4445
Constant{T}(::Periodic{Nothing}) where {T<:ConstantInterpType} = Constant{T,Periodic{OnCell}}(Periodic(OnCell()))
45-
Constant(::Type{T}) where T <: ConstantInterpType = Constant{T}()
4646

4747
function Base.show(io::IO, deg::Constant)
4848
print(io, nameof(typeof(deg)), '{', typeof(deg).parameters[1], '}', '(')

0 commit comments

Comments
 (0)