🐐 DECIMATIO
This commit is contained in:
@@ -248,12 +248,14 @@ Vnlike many other programming languages with modules, the modules in `CENTVRION`
|
||||
### FORS
|
||||

|
||||
|
||||
The `FORS` module allows you to add randomness to your `CENTVRION` program. It adds 3 new built-in functions: `FORTIS_NVMERVS int int`, `FORTIS_ELECTIONIS ['a]`, and `SEMEN int`.
|
||||
The `FORS` module allows you to add randomness to your `CENTVRION` program. It adds 4 new built-in functions: `FORTIS_NVMERVS int int`, `FORTIS_ELECTIONIS ['a]`, `DECIMATIO ['a]`, and `SEMEN int`.
|
||||
|
||||
`FORTIS_NVMERVS int int` picks a random int in the (inclusive) range of the two given ints.
|
||||
|
||||
`FORTIS_ELECTIONIS ['a]` picks a random element from the given array. `FORTIS_ELECTIONIS array` is identical to ```array[FORTIS_NVMERVS NVLLVS ((LONGITVDO array)-I)]```.
|
||||
|
||||
`DECIMATIO ['a]` returns a copy of the given array with a random tenth of its elements removed. Arrays with fewer than 10 elements are returned unchanged.
|
||||
|
||||
`SEMEN int` seeds the random number generator for reproducibility.
|
||||
|
||||
### FRACTIO
|
||||
|
||||
Reference in New Issue
Block a user