Skip to content

Commit

Permalink
Improve inferrability of lsf_rotate in Julia v1.10+ (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Aug 31, 2023
1 parent 9f4e7c9 commit 4cd6c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lsf_rotate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function lsf_rotate(Δ::T, vsini::T, ɛ::T) where {T<:AbstractFloat}
e1 = 2*(1 - ɛ)
e2 = pi*ɛ/2
e3 = pi*(1 - ɛ/3)
x1 = abs.(1 .- (vel ./ vsini) .^ 2)
x1 = abs.(T(1) .- (vel ./ vsini) .^ T(2)) # Use T(...) to work around https://github.com/JuliaLang/julia/issues/51129
return vel, (e1 .* sqrt.(x1) .+ e2 .* x1) ./ e3
end

Expand Down

0 comments on commit 4cd6c16

Please sign in to comment.