2 unstable releases
Uses old Rust 2015
0.2.0 | Jul 5, 2017 |
---|---|
0.1.0 | Jun 30, 2017 |
#236 in #info
3KB
Randnum
Randnum is a command line program written in rust to generate random integers or floats.
Usage
To generate random numbers simply open the command line and run the following commands:
$ cargo build --release
$ cargo run [lower limit] [upper limit] [float flag]
Ok. Lets go over each command. The first command "cargo build" builds the source into an executable. The second command runs the execuatable and has many flags.
- The first flag is the lower limit, AKA the lowest number the generator will create.
- The second flag is the upper limit, AKA the highest number the generator will create.
- The third flag will determine if the program should round the output
So to generate a whole number between 1 and 100 you should run:
$ cargo run 1 100
To generate a non-whole number between 1 and 100 you should run
cargo run 1 100 f
TODO
-
Add support to easily generate multiple random numbers
-
Change input to the Clap crate
Dependencies
~330–560KB