aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2024-05-05 16:41:38 +0630
committerGitHub <noreply@github.com>2024-05-05 12:11:38 +0200
commit7375a691e232bb59033980dc09c7179bc16e377f (patch)
tree1713a55a9c8a4199292c4668c950404ba1e033c1
parent1b05b2ebfac63034d3dd14a7a5b9b87c59377529 (diff)
downloadrapier-7375a691e232bb59033980dc09c7179bc16e377f.tar.gz
rapier-7375a691e232bb59033980dc09c7179bc16e377f.tar.bz2
rapier-7375a691e232bb59033980dc09c7179bc16e377f.zip
Fix some typos. (#620)
-rw-r--r--CHANGELOG.md4
-rw-r--r--examples2d/trimesh2.rs4
-rw-r--r--src/control/character_controller.rs2
-rw-r--r--src/counters/mod.rs6
-rw-r--r--src/counters/stages_counters.rs2
-rw-r--r--src/data/graph.rs2
-rw-r--r--src/data/pubsub.rs2
-rw-r--r--src/dynamics/rigid_body.rs2
-rw-r--r--src/dynamics/rigid_body_components.rs2
-rw-r--r--src/dynamics/rigid_body_set.rs2
-rw-r--r--src/dynamics/solver/solver_constraints_set.rs2
-rw-r--r--src/geometry/broad_phase.rs2
-rw-r--r--src/geometry/collider.rs2
-rw-r--r--src/pipeline/query_pipeline.rs2
-rw-r--r--src/utils.rs2
-rw-r--r--src_testbed/testbed.rs2
16 files changed, 20 insertions, 20 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ce31b0..8c82543 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -269,7 +269,7 @@ without affecting performance of the other parts of the simulation.
- Joint motors no longer have a `VelocityBased` model. The new choices are `AccelerationBased` and `ForceBased`
which are more stable.
- Calling the `.build()` function from builders (`RigidBodyBuilder`, `ColliderBuilder`, etc.) is no longer necessary
- whan adding them to sets. It is automatically called thanks to `Into<_>` implementations.
+ when adding them to sets. It is automatically called thanks to `Into<_>` implementations.
- The `ComponentSet` abstractions (and related `_generic` methods like `PhysicsPipeline::step_generic`) have been
removed. Custom storage for colliders and rigid-bodies are no longer possible: use the built-in `RigidBodySet` and
`ColliderSet` instead.
@@ -309,7 +309,7 @@ reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/3
- All the impulse-based joints have been replaced by a single generic 6-Dofs joint in 3D
(or 3-Dofs joint in 2D) named `ImpulseJoint`. The `RevoluteJoint, PrismaticJoint, FixedJoint`,
- and `SphericalJoint` (formely named `BallJoint`) structures still exist but are just convenient
+ and `SphericalJoint` (formerly named `BallJoint`) structures still exist but are just convenient
ways to initialize the generic `ImpulseJoint`.
- Our constraints solver has been modified. Before we used one velocity-based resolution followed
by one position-based resolution. We are now using two velocity-based resolution: the first one
diff --git a/examples2d/trimesh2.rs b/examples2d/trimesh2.rs
index 6a51d18..a295db5 100644
--- a/examples2d/trimesh2.rs
+++ b/examples2d/trimesh2.rs
@@ -41,7 +41,7 @@ pub fn init_world(testbed: &mut Testbed) {
colliders.insert_with_parent(collider, handle, &mut bodies);
/*
- * Create the trimeshes from a tesselated SVG.
+ * Create the trimeshes from a tessellated SVG.
*/
let mut fill_tess = FillTessellator::new();
let opt = usvg::Options::default();
@@ -67,7 +67,7 @@ pub fn init_world(testbed: &mut Testbed) {
&FillOptions::tolerance(0.01),
&mut BuffersBuilder::new(&mut mesh, VertexCtor { prim_id: 0 }),
)
- .expect("Tesselation failed.");
+ .expect("Tessellation failed.");
let angle = transform.get_rotate() as f32;
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs
index ca088b2..cc12bd8 100644
--- a/src/control/character_controller.rs
+++ b/src/control/character_controller.rs
@@ -18,7 +18,7 @@ pub enum CharacterLength {
/// for a shape with an height equal to 20.0 will result in a maximum step height
/// of `0.1 * 20.0 = 2.0`.
Relative(Real),
- /// The length is specified as an aboslute value, independent from the character shape’s size.
+ /// The length is specified as an absolute value, independent from the character shape’s size.
///
/// For example setting `CharacterAutostep::max_height` to `CharacterLength::Relative(0.1)`
/// for a shape with an height equal to 20.0 will result in a maximum step height
diff --git a/src/counters/mod.rs b/src/counters/mod.rs
index e707025..99a627a 100644
--- a/src/counters/mod.rs
+++ b/src/counters/mod.rs
@@ -17,7 +17,7 @@ mod timer;
/// Aggregation of all the performances counters tracked by rapier.
#[derive(Clone, Copy)]
pub struct Counters {
- /// Whether thi counter is enabled or not.
+ /// Whether this counter is enabled or not.
pub enabled: bool,
/// Timer for a whole timestep.
pub step_time: Timer,
@@ -69,7 +69,7 @@ impl Counters {
}
}
- /// Notfy that the time-step has finished.
+ /// Notify that the time-step has finished.
pub fn step_completed(&mut self) {
if self.enabled {
self.step_time.pause();
@@ -88,7 +88,7 @@ impl Counters {
}
}
- /// Notfy that the custom operation has finished.
+ /// Notify that the custom operation has finished.
pub fn custom_completed(&mut self) {
if self.enabled {
self.custom.pause();
diff --git a/src/counters/stages_counters.rs b/src/counters/stages_counters.rs
index 7e3198a..3134986 100644
--- a/src/counters/stages_counters.rs
+++ b/src/counters/stages_counters.rs
@@ -21,7 +21,7 @@ pub struct StagesCounters {
}
impl StagesCounters {
- /// Create a new counter intialized to zero.
+ /// Create a new counter initialized to zero.
pub fn new() -> Self {
StagesCounters {
update_time: Timer::new(),
diff --git a/src/data/graph.rs b/src/data/graph.rs
index 6a3ba15..6c701e4 100644
--- a/src/data/graph.rs
+++ b/src/data/graph.rs
@@ -370,7 +370,7 @@ impl<N, E> Graph<N, E> {
// indices.
let edge = self.edges.swap_remove(e.index());
let swap = match self.edges.get(e.index()) {
- // no elment needed to be swapped.
+ // no element needed to be swapped.
None => return Some(edge.weight),
Some(ed) => ed.node,
};
diff --git a/src/data/pubsub.rs b/src/data/pubsub.rs
index 619521e..d595e03 100644
--- a/src/data/pubsub.rs
+++ b/src/data/pubsub.rs
@@ -103,7 +103,7 @@ impl<T> PubSub<T> {
subscription
}
- /// Read the i-th message not yet read by the given subsciber.
+ /// Read the i-th message not yet read by the given subscriber.
pub fn read_ith(&self, sub: &Subscription<T>, i: usize) -> Option<&T> {
let cursor = &self.cursors[sub.id as usize];
self.messages.get(cursor.next(self.deleted_messages) + i)
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs
index 7f95a31..b822aa9 100644
--- a/src/dynamics/rigid_body.rs
+++ b/src/dynamics/rigid_body.rs
@@ -443,7 +443,7 @@ impl RigidBody {
self.ccd.ccd_enabled = enabled;
}
- /// Is CCD (continous collision-detection) enabled for this rigid-body?
+ /// Is CCD (continuous collision-detection) enabled for this rigid-body?
pub fn is_ccd_enabled(&self) -> bool {
self.ccd.ccd_enabled
}
diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs
index f5698a4..a391feb 100644
--- a/src/dynamics/rigid_body_components.rs
+++ b/src/dynamics/rigid_body_components.rs
@@ -595,7 +595,7 @@ impl RigidBodyVelocity {
}
/// Integrate the velocities in `self` to compute obtain new positions when moving from the given
- /// inital position `init_pos`.
+ /// initial position `init_pos`.
#[must_use]
pub fn integrate(
&self,
diff --git a/src/dynamics/rigid_body_set.rs b/src/dynamics/rigid_body_set.rs
index 2356364..a7d2ec3 100644
--- a/src/dynamics/rigid_body_set.rs
+++ b/src/dynamics/rigid_body_set.rs
@@ -209,7 +209,7 @@ impl RigidBodySet {
/// Update colliders positions after rigid-bodies moved.
///
/// When a rigid-body moves, the positions of the colliders attached to it need to be updated.
- /// This update is generally automatically done at the beggining and the end of each simulation
+ /// This update is generally automatically done at the beginning and the end of each simulation
/// step with `PhysicsPipeline::step`. If the positions need to be updated without running a
/// simulation step (for example when using the `QueryPipeline` alone), this method can be called
/// manually.
diff --git a/src/dynamics/solver/solver_constraints_set.rs b/src/dynamics/solver/solver_constraints_set.rs
index 4259098..1161c55 100644
--- a/src/dynamics/solver/solver_constraints_set.rs
+++ b/src/dynamics/solver/solver_constraints_set.rs
@@ -96,7 +96,7 @@ impl<Constraints: ConstraintTypes> SolverConstraintsSet<Constraints> {
}
}
- #[allow(dead_code)] // Useful for debuging.
+ #[allow(dead_code)] // Useful for debugging.
pub fn print_counts(&self) {
println!("Solver constraints:");
println!(
diff --git a/src/geometry/broad_phase.rs b/src/geometry/broad_phase.rs
index ea7c774..836ebc8 100644
--- a/src/geometry/broad_phase.rs
+++ b/src/geometry/broad_phase.rs
@@ -8,7 +8,7 @@ pub type BroadPhaseProxyIndex = u32;
/// Trait implemented by broad-phase algorithms supported by Rapier.
///
/// The task of a broad-phase algorithm is to detect potential collision pairs, usually based on
-/// bounding volumes. The pairs must be concervative: it is OK to create a collision pair if
+/// bounding volumes. The pairs must be conservative: it is OK to create a collision pair if
/// two objects don’t actually touch, but it is incorrect to remove a pair between two objects
/// that are still touching. In other words, it can have false-positive (though these induce
/// some computational overhead on the narrow-phase), but cannot have false-negative.
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs
index e02b0f2..dfa532c 100644
--- a/src/geometry/collider.rs
+++ b/src/geometry/collider.rs
@@ -302,7 +302,7 @@ impl Collider {
}
}
- /// Sets the rotational part of this collider's rotaiton relative to its parent rigid-body.
+ /// Sets the rotational part of this collider's rotation relative to its parent rigid-body.
pub fn set_rotation_wrt_parent(&mut self, rotation: AngVector<Real>) {
if let Some(parent) = self.parent.as_mut() {
self.changes.insert(ColliderChanges::PARENT);
diff --git a/src/pipeline/query_pipeline.rs b/src/pipeline/query_pipeline.rs
index bca0cc4..d98017b 100644
--- a/src/pipeline/query_pipeline.rs
+++ b/src/pipeline/query_pipeline.rs
@@ -100,7 +100,7 @@ impl QueryFilterFlags {
}
}
-/// A filter tha describes what collider should be included or excluded from a scene query.
+/// A filter that describes what collider should be included or excluded from a scene query.
#[derive(Copy, Clone, Default)]
pub struct QueryFilter<'a> {
/// Flags indicating what particular type of colliders should be excluded from the scene query.
diff --git a/src/utils.rs b/src/utils.rs
index 6521b0f..5025744 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -647,7 +647,7 @@ impl SimdAngularInertia<SimdReal> for SdpMatrix3<SimdReal> {
}
// This is an RAII structure that enables flushing denormal numbers
-// to zero, and automatically reseting previous flags once it is dropped.
+// to zero, and automatically resetting previous flags once it is dropped.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(crate) struct FlushToZeroDenormalsAreZeroFlags {
original_flags: u32,
diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs
index f76100d..6ddc949 100644
--- a/src_testbed/testbed.rs
+++ b/src_testbed/testbed.rs
@@ -1,4 +1,4 @@
-#![allow(clippy::bad_bit_mask)] // otherwsie clippy complains because of TestbedStateFlags::NONE which is 0.
+#![allow(clippy::bad_bit_mask)] // otherwise clippy complains because of TestbedStateFlags::NONE which is 0.
use std::env;
use std::mem;