Skip to content
  1. Jun 09, 2023
  2. Jun 08, 2023
  3. Jun 07, 2023
  4. May 22, 2023
  5. Nov 02, 2022
  6. Feb 08, 2021
    • Nathan Lovato's avatar
      Merge pull request #202 from theraot/bugfix · 17dae66f
      Nathan Lovato authored
      Use drop chance correctly
      17dae66f
    • Theraot's avatar
      Use drop chance correctly · c87a8246
      Theraot authored
      Given that `randf` output is in the range [0, 1] inclusive, and we want `chance = 0` to mean never, and `chance = 1` to mean always, we need to worry about the edge cases.
      
      We need the `>=` because when `randf() == 0` and `chance == 0` just using `>` would give us the wrong result.
      
      We need to compare against 1 because when `randf() == 1` and `chance == 1` we would get the wrong reasult due to the `>=`.
      
      This is the from I found easier to read.
      c87a8246
  7. Feb 07, 2021
  8. Jun 12, 2020
  9. Jun 11, 2020
  10. May 12, 2020
  11. Apr 14, 2020
  12. Feb 01, 2020
  13. Jan 02, 2020
  14. Dec 11, 2019
  15. Oct 14, 2019
  16. Jun 27, 2019
  17. Jan 21, 2019
  18. Jan 15, 2019
  19. Jan 11, 2019
  20. Jan 09, 2019
  21. Jan 08, 2019
Loading