Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call rnd(table) to get a random table element #14

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Commits on Jan 28, 2021

  1. Call rnd(table) to get a random table element

    As of 2.0.0, you can call `rnd` with a table as the argument to get a random element from the table.
    
    This PR adds that to the `tables` tab.
    
    From the [PICO-8 manual](https://www.lexaloffle.com/pico-8.php?page=manual):
    ```
    	rnd x
    		Returns a random number n, where 0 <= n < x
    		If you want an integer, use flr(rnd(x))
    		If x is an array-style table, return a random element between table[1] and table[#table].
    ```
    andrewedstrom authored Jan 28, 2021
    Configuration menu
    Copy the full SHA
    a40f5f2 View commit details
    Browse the repository at this point in the history