# is_multiple in ladderz::pre_algebra - Rust
Checks if a positive integer `x` is a multiple of another positive integer `y`.

# Function ladderz::pre_algebra::is_multiple

source ·

    pub fn is_multiple(x: u32, y: u32) -> bool

Expand description

Checks if a positive integer `x` is a multiple of another positive integer `y`.

A multiple of `y` is a positive integer `x` where `x` is evenly divisible by `y` (i.e., `x % y == 0`).

## Examples

    use ladderz::pre_algebra::is_multiple;

    fn main() {
        assert!(is_multiple(16, 2)); // 16 is a multiple of 2
        assert!(!is_multiple(16, 3)); // 16 is not a multiple of 3
    }