sannybuilder / dev

Sanny Builder Bug Tracker and Roadmap development
https://sannybuilder.com
49 stars 0 forks source link

min() and max() built-in commands #208

Closed firedihm closed 3 months ago

firedihm commented 1 year ago

This is a request to add min() and max() built-in commands. It would receive 3 arguments and would store min/max of two values into the third one.

Some examples:

0@ = rand(1,5)
1@ = rand(1,5)
if 0@ > 1@
then 2@ = 1@
else 2@ = 0@
end
0@ = rand(1,5)
1@ = rand(1,5)
min(2@, 0@, 1@)

Should also work with only 2 unique vars

0@ = rand(1,5)
1@ = rand(1,5)
if 0@ > 1@
then 0@ = 1@
end
0@ = rand(1,5)
1@ = rand(1,5)
min(0@, 0@, 1@)

Maybe even:

0@ = rand(1,5)
1@ = rand(1,5)
2@ = min(0@, 1@)
x87 commented 1 year ago

can be implemented with #206