#generate #command-line #numbers #info #github

app randnum

A crate for generating random numbers the command line. See the README on github for more info

2 unstable releases

Uses old Rust 2015

0.2.0 Jul 5, 2017
0.1.0 Jun 30, 2017

#236 in #info

MIT license

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.

  1. The first flag is the lower limit, AKA the lowest number the generator will create.
  2. The second flag is the upper limit, AKA the highest number the generator will create.
  3. 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

  1. Add support to easily generate multiple random numbers

  2. Change input to the Clap crate

Dependencies

~330–560KB