Temporary fix for random numbers that are 1.0f

- convert the assert into code that lowers 1.0f a little; this modifies
  the pdf but should not be a problem since it does not happen very
  often.