mirror of
https://github.com/rzmk/ladderz.git
synced 2025-12-19 06:59:25 +00:00
docs: improve organization of function docstrings
This commit is contained in:
parent
b4d484686f
commit
563133d635
1 changed files with 8 additions and 4 deletions
|
|
@ -2,10 +2,12 @@ use std::collections::HashSet;
|
||||||
|
|
||||||
/// Finds all factor pairs for a positive integer `n`.
|
/// Finds all factor pairs for a positive integer `n`.
|
||||||
///
|
///
|
||||||
/// This function calculates and returns a `HashSet<(u32, u32)>` containing all unique factor pairs
|
/// A factor pair is a pair of positive integers
|
||||||
/// of the input positive integer `n`. A factor pair is a pair of positive integers
|
|
||||||
/// `(a, b)` where `a` and `b` are both factors of `n` (i.e., `a * b == n`).
|
/// `(a, b)` where `a` and `b` are both factors of `n` (i.e., `a * b == n`).
|
||||||
///
|
///
|
||||||
|
/// This function calculates and returns a `HashSet<(u32, u32)>` containing all unique factor pairs
|
||||||
|
/// of the input positive integer `n`.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
|
@ -43,10 +45,12 @@ pub fn get_factor_pairs(n: u32) -> HashSet<(u32, u32)> {
|
||||||
|
|
||||||
/// Finds all factors of a positive integer `n`.
|
/// Finds all factors of a positive integer `n`.
|
||||||
///
|
///
|
||||||
/// This function calculates and returns a `HashSet<u32>` containing all unique factors
|
/// A factor of `n` is a positive integer `a` where
|
||||||
/// of the input positive integer `n`. A factor of `n` is a positive integer `a` where
|
|
||||||
/// `n` is evenly divisible by `a` (i.e., `n % a == 0`).
|
/// `n` is evenly divisible by `a` (i.e., `n % a == 0`).
|
||||||
///
|
///
|
||||||
|
/// This function calculates and returns a `HashSet<u32>` containing all unique factors
|
||||||
|
/// of the input positive integer `n`.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue