Skip to content

Commit

Permalink
double factorial: change argument to (::Type{T},n), add inline (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
HMegh authored Oct 23, 2024
1 parent f14f023 commit 3c1e5a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LegendrePolynomials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function Pl(x, l::Integer; norm = Val(:standard))
return maybenormalize(Pl, l, norm)
end

function doublefactorial(T, n)
@inline function doublefactorial(::Type{T}, n) where T
p = convert(T, one(n))
for i in n:-2:1
p *= convert(T, i)
Expand Down

0 comments on commit 3c1e5a2

Please sign in to comment.