Skip to content

Commit 9147994

Browse files
author
Christian Haack
committed
fix make_inverse_es_polynomial to ensure proper type handling for cos_theta
1 parent ce8c8d3 commit 9147994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scattering.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ end
126126
Make a 3rd order polynomial that approximates the inverse of the ES scattering function.
127127
"""
128128
function make_inverse_es_polynomial(b::T) where {T<:Real}
129-
cos_theta = -1:0.01:1
129+
cos_theta = T.(-1:0.01:1)
130130
es_poly = fit(Polynomial, es_scattering_cumulative.(cos_theta, b), cos_theta, 3)
131131
return ImmutablePolynomial(Tuple(T.(collect(es_poly))))
132132
end

0 commit comments

Comments
 (0)