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

@@ -4,7 +4,7 @@ use rand::{seq::SliceRandom, Rng};
use std::f32::consts::TAU;
use std::fmt::{Display, Formatter};
// A single Physarum agent. The x and y positions are continuous, hence we use floating point numbers instead of integers.
/// A single Physarum agent. The x and y positions are continuous, hence we use floating point numbers instead of integers.
#[derive(Debug, Clone, PartialEq)]
pub struct Agent {
pub x: f32,
@@ -21,7 +21,7 @@ impl Display for Agent {
}
impl Agent {
// Construct a new agent with random parameters.
/// Construct a new agent with random parameters.
pub fn new<R: Rng + ?Sized>(
width: usize,
height: usize,
@@ -39,7 +39,7 @@ impl Agent {
}
}
// Tick an agent
/// Tick an agent
pub fn tick(
&mut self,
buf: &Buf,