proper doc comments

This commit is contained in:
2025-03-27 14:53:36 -04:00
parent 50e85dec90
commit eee266979c
7 changed files with 27 additions and 31 deletions

View File

@@ -12,7 +12,7 @@ pub struct ThinGridData {
}
impl ThinGridData {
// Convert Grid to ThinGridData
/// Convert Grid to ThinGridData
pub fn new_from_grid(in_grid: &Grid) -> Self {
ThinGridData {
width: in_grid.width,
@@ -22,13 +22,10 @@ impl ThinGridData {
}
pub fn new_from_grid_vec(in_grids: &[Grid]) -> Vec<Self> {
in_grids
.iter()
.map(Self::new_from_grid)
.collect()
in_grids.iter().map(Self::new_from_grid).collect()
}
// from grid.rs (needed in image gen)
/// from grid.rs (needed in image gen)
pub fn quantile(&self, fraction: f32) -> f32 {
let index = if (fraction - 1.0_f32).abs() < f32::EPSILON {
self.data.len() - 1