Skip to content
  1. Dec 22, 2023
  2. Dec 21, 2023
  3. Dec 20, 2023
  4. Dec 19, 2023
  5. Dec 15, 2023
  6. Dec 01, 2023
  7. Nov 28, 2023
  8. Nov 07, 2023
  9. Nov 05, 2023
  10. Oct 28, 2023
  11. Oct 11, 2023
  12. Oct 08, 2023
  13. Sep 08, 2023
  14. Sep 01, 2023
  15. Aug 21, 2023
  16. Aug 18, 2023
  17. Jul 10, 2023
  18. Jun 16, 2023
  19. Jun 11, 2023
  20. Jun 10, 2023
  21. Jun 09, 2023
  22. Jun 08, 2023
  23. Jun 07, 2023
  24. May 22, 2023
  25. Nov 02, 2022
  26. 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
  27. Feb 07, 2021
  28. Jun 12, 2020
Loading