proper doc comments
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user