package wip

This commit is contained in:
2026-01-23 16:47:56 +11:00
parent f6bfa6b8fd
commit 904ef85f54
18 changed files with 259 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
# math_Random
Generate a random integer in the range provided.
**IMPORTANT:** math_Random is **NOT** cryptographically secure! Use the `cryptography` library instead!
If you want to generate a random double, use `math_RandomDouble`.
## Arguments
- min (int): Smallest possible number
- max (int): Largest possible number
## Returns
randomNumber (int): A random number in the range provided
## Example
```python
call !math_Random 1 6 &dice
println $dice # 3
call !math_Random 1 6 &dice
println $dice # 2
call !math_Random 1 6 &dice
println $dice # 6
...
```

View File

@@ -0,0 +1,22 @@
# math_RandomDouble
Generate a random double in the range provided.
**IMPORTANT:** math_RandomDouble is **NOT** cryptographically secure! Use the `cryptography` library instead!
If you want to generate a random integer, use `math_Random`.
## Arguments
- min (double): Smallest possible number
- max (double): Largest possible number
## Returns
randomNumber (double): A random number in the range provided
## Example
```python
call !math_RandomDouble 0.0 10.0 &randomNumber
println $randomNumber # 5.24...
call !math_RandomDouble 0.0 10.0 &randomNumber
println $randomNumber # 6.58...
call !math_RandomDouble 0.0 10.0 &randomNumber
println $randomNumber # 9.22...
...
```

View File

@@ -0,0 +1,20 @@
# math_RandomSetSeed
Seed the pseudo random number generator.
Seeding the random number generator the same number will always yield the same random number.
## Arguments
- seed (int): Seed
## Returns
math_RandomSetSeed does not return anything.
## Example
```python
call !math_RandomSetSeed 123 &
call !math_Random 1 6 &dice
println $dice # some number
call !math_RandomSetSeed 123 &
call !math_Random 1 6 &dice
println $dice # the same number
# (i cant test this cause libraries are broken as am i writing docs lmao)
```