From 3c1e5a2892d5f15dbe76204e2ea34a4c750ecfca Mon Sep 17 00:00:00 2001 From: Haroun Meghaichi <8241188+HMegh@users.noreply.github.com> Date: Wed, 23 Oct 2024 00:31:03 -0400 Subject: [PATCH] double factorial: change argument to (::Type{T},n), add inline (#24) --- src/LegendrePolynomials.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LegendrePolynomials.jl b/src/LegendrePolynomials.jl index 920dcba..587e39a 100644 --- a/src/LegendrePolynomials.jl +++ b/src/LegendrePolynomials.jl @@ -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)