From dc8aa8ad7009b1a7cb2cafc3f984b4cbad38d860 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 22 Jul 2024 01:06:21 +0700 Subject: [PATCH] Fix some typos. --- benches/core/vector.rs | 2 +- nalgebra-sparse/tests/unit_tests/coo.rs | 2 +- src/base/storage.rs | 2 +- src/geometry/rotation_specialization.rs | 2 +- tests/geometry/quaternion.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/benches/core/vector.rs b/benches/core/vector.rs index 66025bc51..6d5dbdc41 100644 --- a/benches/core/vector.rs +++ b/benches/core/vector.rs @@ -96,7 +96,7 @@ fn vec10000_axpy_f64_static(bh: &mut criterion::Criterion) { let b = SVector::::new_random(); let n = rng.gen::(); - // NOTE: for some reasons, it is much faster if the arument are boxed (Box::new(OVector...)). + // NOTE: for some reasons, it is much faster if the argument are boxed (Box::new(OVector...)). bh.bench_function("vec10000_axpy_f64_static", move |bh| { bh.iter(|| a.axpy(n, &b, 1.0)) }); diff --git a/nalgebra-sparse/tests/unit_tests/coo.rs b/nalgebra-sparse/tests/unit_tests/coo.rs index c3702c492..1dacc7c2a 100644 --- a/nalgebra-sparse/tests/unit_tests/coo.rs +++ b/nalgebra-sparse/tests/unit_tests/coo.rs @@ -298,7 +298,7 @@ fn coo_clear_triplets_valid_entries() { ); coo.clear_triplets(); assert_eq!(coo.triplet_iter().collect::>(), vec![]); - // making sure everyhting works after clearing + // making sure everything works after clearing coo.push(0, 0, 1); coo.push(0, 0, 2); coo.push(2, 2, 3); diff --git a/src/base/storage.rs b/src/base/storage.rs index 708a14402..09bbd553a 100644 --- a/src/base/storage.rs +++ b/src/base/storage.rs @@ -220,7 +220,7 @@ pub unsafe trait RawStorageMut: RawStorage { unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize) { // we can't just use the pointers returned from `get_address_unchecked_linear_mut` because calling a // method taking self mutably invalidates any existing (mutable) pointers. since `get_address_unchecked_linear_mut` can - // also be overriden by a custom implementation, we can't just use `wrapping_add` assuming that's what the method does. + // also be overridden by a custom implementation, we can't just use `wrapping_add` assuming that's what the method does. // instead, we use `offset_from` to compute the re-calculate the pointers from the base pointer. // this is sound as long as this trait matches the Validity preconditions // (and it's the caller's responsibility to ensure the indices are in-bounds). diff --git a/src/geometry/rotation_specialization.rs b/src/geometry/rotation_specialization.rs index 45db03528..1aaf7bac1 100644 --- a/src/geometry/rotation_specialization.rs +++ b/src/geometry/rotation_specialization.rs @@ -1124,7 +1124,7 @@ impl Rotation3 { // lambda = 0, so ensure angle2 -> [0, pi] angles[1] < T::zero() || angles[1] > T::pi() } else { - // lamda = + or - pi/2, so ensure angle2 -> [-pi/2, pi/2] + // lambda = + or - pi/2, so ensure angle2 -> [-pi/2, pi/2] angles[1] < -T::frac_pi_2() || angles[1] > T::frac_pi_2() }; diff --git a/tests/geometry/quaternion.rs b/tests/geometry/quaternion.rs index 75d8b870d..ff7eff6cb 100644 --- a/tests/geometry/quaternion.rs +++ b/tests/geometry/quaternion.rs @@ -102,7 +102,7 @@ proptest!( /* * - * Quaterion * Vector == Rotation * Vector + * Quaternion * Vector == Rotation * Vector * */ #[test]