Skip to content

Commit 4cd6c16

Browse files
authored
Improve inferrability of lsf_rotate in Julia v1.10+ (#82)
1 parent 9f4e7c9 commit 4cd6c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lsf_rotate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function lsf_rotate(Δ::T, vsini::T, ɛ::T) where {T<:AbstractFloat}
77
e1 = 2*(1 - ɛ)
88
e2 = pi*ɛ/2
99
e3 = pi*(1 - ɛ/3)
10-
x1 = abs.(1 .- (vel ./ vsini) .^ 2)
10+
x1 = abs.(T(1) .- (vel ./ vsini) .^ T(2)) # Use T(...) to work around https://github.com/JuliaLang/julia/issues/51129
1111
return vel, (e1 .* sqrt.(x1) .+ e2 .* x1) ./ e3
1212
end
1313

0 commit comments

Comments
 (0)