https://github.com/nukeop/is-odd
Returns true if the given number is odd.
https://github.com/nukeop/is-odd
Last synced: over 1 year ago
JSON representation
Returns true if the given number is odd.
- Host: GitHub
- URL: https://github.com/nukeop/is-odd
- Owner: nukeop
- License: mit
- Created: 2018-05-26T17:34:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-23T21:56:36.000Z (over 1 year ago)
- Last Synced: 2025-03-30T12:08:19.750Z (over 1 year ago)
- Language: Rust
- Homepage: https://crates.io/crates/is-odd
- Size: 12.7 KB
- Stars: 29
- Watchers: 3
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-odd
Returns true if the given number is odd.
## Install
Specify the dependencty in Cargo.toml:
```toml
[dependencies]
is-odd = "1.1.1"
```
Or:
```bash
$ cargo add is_odd
```
Fetch it with cargo:
```bash
$ cargo build
```
## Usage
```rust
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](https://github.com/nukeop).
Released under the [MIT License](LICENSE).