Skip to content

Commit

Permalink
Merge pull request #26 from Space-Systems/manschub-patch-2
Browse files Browse the repository at this point in the history
Update slam_randomNumber.f90
  • Loading branch information
manschub authored Jan 9, 2025
2 parents a6afc50 + cfdd70c commit 5e4600f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/math/slam_randomNumber.f90
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ real(dp) function getRandomNumber(iopt, xmean, xsigma)
else if(iopt == RANDOM_NORMAL .or. iopt == RANDOM_LOG_NORMAL) then

!** check if there is already a number available
if(isOtherNumber(iopt) .and. (xmean_prev == xmean) .and. (xsigma_prev == xsigma)) then
if(isOtherNumber(iopt)) then
if ((xmean_prev == xmean) .and. (xsigma_prev == xsigma)) then

getRandomNumber = otherNumber(iopt)
isOtherNumber(iopt) = .false.
getRandomNumber = otherNumber(iopt)
isOtherNumber(iopt) = .false.
end if

else !** generate two new numbers

Expand Down

0 comments on commit 5e4600f

Please sign in to comment.