From 6186fda6b5e7db70d66eb3eed8e4f9dfcdf46cca Mon Sep 17 00:00:00 2001 From: Jakub Marcowski <37378746+Chubercik@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:46:15 +0200 Subject: [PATCH] Fix some docstrings in `tetrahedron.rs` (#187) --- src/shape/tetrahedron.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/shape/tetrahedron.rs b/src/shape/tetrahedron.rs index 94149781..6ec25331 100644 --- a/src/shape/tetrahedron.rs +++ b/src/shape/tetrahedron.rs @@ -24,13 +24,13 @@ use rkyv::{bytecheck, CheckBytes}; #[derive(Copy, Clone, Debug)] #[repr(C)] pub struct Tetrahedron { - /// The tetrahedron first point. + /// The tetrahedron's first point. pub a: Point, - /// The tetrahedron first point. + /// The tetrahedron's second point. pub b: Point, - /// The tetrahedron first point. + /// The tetrahedron's third point. pub c: Point, - /// The tetrahedron first point. + /// The tetrahedron's fourth point. pub d: Point, } @@ -41,7 +41,7 @@ pub enum TetrahedronPointLocation { OnVertex(u32), /// The point lies on an edge. /// - /// The 0-st edge is the segment AB. + /// The 0-th edge is the segment AB. /// The 1-st edge is the segment AC. /// The 2-nd edge is the segment AD. /// The 3-rd edge is the segment BC. @@ -106,7 +106,7 @@ impl TetrahedronPointLocation { } impl Tetrahedron { - /// Creates a tetrahedron from three points. + /// Creates a tetrahedron from four points. #[inline] pub fn new(a: Point, b: Point, c: Point, d: Point) -> Tetrahedron { Tetrahedron { a, b, c, d } @@ -151,7 +151,7 @@ impl Tetrahedron { /// Returns the i-th edge of this tetrahedron. /// - /// The 0-st edge is the segment AB. + /// The 0-th edge is the segment AB. /// The 1-st edge is the segment AC. /// The 2-nd edge is the segment AD. /// The 3-rd edge is the segment BC. @@ -171,7 +171,7 @@ impl Tetrahedron { /// Returns the indices of the vertices of the i-th edge of this tetrahedron. /// - /// The 0-st edge is the segment AB. + /// The 0-th edge is the segment AB. /// The 1-st edge is the segment AC. /// The 2-nd edge is the segment AD. /// The 3-rd edge is the segment BC. @@ -217,8 +217,8 @@ impl Tetrahedron { /// Computes the signed volume of this tetrahedron. /// - /// If it is positive, `p4` is on the half-space pointed by the normal of the oriented triangle - /// `(p1, p2, p3)`. + /// If it is positive, `p4` is on the half-space pointed by the normal + /// of the oriented triangle `(p1, p2, p3)`. #[inline] pub fn signed_volume(&self) -> Real { let p1p2 = self.b - self.a;