in_range 0.1.0

Returns true if a number is in range
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented1 out of 5 items with examples
  • Size
  • Source code size: 16.34 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 261.15 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • njs-guy/in-range-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • njs-guy

In range

A Rust library to return true if a number is in range.

Usage

First, install the library with

cargo add in_range

Then, in code:

use in_range::in_range;

// Args: value, min, max
let result = in_range(10, 1, 15);

print!("{}", result);
// Prints true;

You can also use not_in_range to return false when value is in range.

use in_range::not_in_range;

// Args: value, min, max
let result = not_in_range(25, 1, 15);

print!("{}", result);
// Prints true;

License

In range uses the Rust standard MIT/Apache-2.0 dual license for best compatibility. See LICENSE-APACHE.txt and LICENSE-MIT.txt for the full licenses.