Closed huafu closed 1 year ago
In the documentation it seems to have rand and srand, tho on the last build (last commit from 2022-10-05):
rand
srand
# ucode -p 'rand();' Type error: left-hand side is not a function In [-p argument], line 1, byte 6: `rand();` ^-- Near here
and
# ucode -p 'srand(10);' Type error: left-hand side is not a function In [-p argument], line 1, byte 9: `srand(10);` ^-- Near here
They have been moved to the math module. Use import { rand, srand } from 'math';
math
import { rand, srand } from 'math';
In the documentation it seems to have
rand
andsrand
, tho on the last build (last commit from 2022-10-05):and