# Module ladderz::pre_algebra

source ·
Expand description

Various pre-algebra implementations including factor pairs, factors, multiples, and more.

## Example

    use ladderz::pre_algebra::get_factors;

    let x: u32 = 10;
    println!("The factors of {x} are {:?}.", get_factors(x));

    The factors of 10 are {1, 5, 2, 10}.

## Functions

- get_factor_pairs
  Finds all factor pairs for a positive integer `n`.
- get_factors
  Finds all factors of a positive integer `n`.
- get_multiples_in_range
  Finds all the multiples of a positive integer `n` up to and including `end` (in the range [n, end]).
- is_composite
  Checks if a positive integer `n` is a composite number.
- is_factor
  Checks if a positive integer `x` is a factor of another positive integer `y`.
- is_multiple
  Checks if a positive integer `x` is a multiple of another positive integer `y`.
- is_prime
  Checks if a positive integer `n` is a prime number.