4 stable releases

1.1.1 Dec 23, 2024
1.1.0 Nov 11, 2023
1.0.1 Oct 25, 2023
1.0.0 May 26, 2018

#543 in Rust patterns

Download history 100/week @ 2024-11-30 337/week @ 2024-12-07 178/week @ 2024-12-14 193/week @ 2024-12-21 99/week @ 2024-12-28 105/week @ 2025-01-04 384/week @ 2025-01-11 218/week @ 2025-01-18 358/week @ 2025-01-25 341/week @ 2025-02-01 187/week @ 2025-02-08 168/week @ 2025-02-15 247/week @ 2025-02-22 177/week @ 2025-03-01 237/week @ 2025-03-08 136/week @ 2025-03-15

822 downloads per month
Used in 5 crates (3 directly)

MIT license

4KB

is-odd

Returns true if the given number is odd.

Install

Specify the dependencty in Cargo.toml:

[dependencies]
is-odd = "1.1.1"

Or:

$ cargo add is_odd

Fetch it with cargo:

$ cargo build

Usage

use is_odd::IsOdd;

let _i : i32 = 1;
println!("{}", _i.is_odd()); // prints true

About

Currently, the library support both integer and floating point numbers.

License

Copyright © 2018, nukeop. Released under the MIT License.

No runtime deps