The distance from the body's center to the umbra's apex at the last update (huge() for a body no smaller than its light; 0 before).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ShadowCones), | intent(in) | :: | self |
pure real(wp) function umbra_length(self) class(ShadowCones), intent(in) :: self real(wp) :: r, rs, d r = self%shaped(1) rs = self%shaped(2) d = self%shaped(3) umbra_length = 0.0_wp if (d <= 0.0_wp) return if (rs > r) then umbra_length = d * r / (rs - r) else umbra_length = huge(1.0_wp) end if end function umbra_length