Skip to content

Commit

Permalink
Fix some docstrings in tetrahedron.rs (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chubercik authored Apr 28, 2024
1 parent 69d35aa commit 6186fda
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/shape/tetrahedron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Real>,
/// The tetrahedron first point.
/// The tetrahedron's second point.
pub b: Point<Real>,
/// The tetrahedron first point.
/// The tetrahedron's third point.
pub c: Point<Real>,
/// The tetrahedron first point.
/// The tetrahedron's fourth point.
pub d: Point<Real>,
}

Expand All @@ -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.
Expand Down Expand Up @@ -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<Real>, b: Point<Real>, c: Point<Real>, d: Point<Real>) -> Tetrahedron {
Tetrahedron { a, b, c, d }
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6186fda

Please sign in to comment.