PMT is a project for fun. This tool use math to make some fun things. For example, you can use this tool to make a decision what to eat today.
- Rust
https://www.rust-lang.org/tools/install
make release
This command will generate a binary file in the bin
directory.
./bin/pmt <command> <args>
./bin/pmt help
./bin/pmt --help
./bin/pmt -h
./bin/pmt help <command>
./bin/pmt <command> --help
./bin/pmt <command> -h
You can get help information for any command.
./bin/pmt choose number \
--rolls <rolls> \ # how many times to roll the dice for each number
--count <count> \ # how many numbers to get in the end
--precision <precision> \ # how many decimal places to keep (be careful, it may cause performance issue)
--unique \ # if the numbers should be unique
--sort \ # if the numbers should be sorted
{}
./bin/pmt choose variant \
--rolls <rolls> \ # how many times to roll the dice for each value
--count <count> \ # how many values to get in the end
--unique \ # if the values should be unique
--sort \ # if the values should be sorted
<value1> <value2> ... # values to choose from
you also can use $(cat ) to input values from a file.
./bin/pmt choose variant \
--rolls <rolls> \ # how many times to roll the dice for each value
--count <count> \ # how many values to get in the end
$(cat <file>)
or even keep in file the full configuration
--rolls <rolls> # how many times to roll the dice for each value
--count <count> # how many values to get in the end
# values to choose from
VALUE1
VALUE2
...
./bin/pmt choose variant $(cat <file>)
./bin/pmt math ...
It also contains some math functions, like different mean (arithmetic, geometric, ...), median, mode, variance, standard deviation, etc. They are being added by the mood.