Remove warning on mu outside of [-1,1).

This commit is contained in:
Paul Romano 2012-02-15 16:05:34 -05:00
parent 76b5647f58
commit 0131e7e297

View file

@ -1166,12 +1166,11 @@ contains
call fatal_error()
end if
if (abs(mu) > ONE) then
message = "Sampled cosine of angle outside [-1, 1)."
call warning()
! Because of floating-point roundoff, it may be possible for mu to be
! outside of the range [-1,1). In these cases, we just set mu to exactly
! -1 or 1
mu = sign(ONE,mu)
end if
if (abs(mu) > ONE) mu = sign(ONE,mu)
else
message = "Unknown angular distribution type: " // trim(to_str(type))