Skip to content

Commit

Permalink
Fix typos. (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Feb 8, 2024
1 parent 6c982b2 commit 1cd4995
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion codegen/templates/mat.rs.tera
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ impl {{ self_t }} {
/// `1.0`.
///
/// This method assumes that `self` contains a valid affine transform. It does not perform
/// a persective divide, if `self` contains a perspective transform, or if you are unsure,
/// a perspective divide, if `self` contains a perspective transform, or if you are unsure,
/// the [`Self::project_point3()`] method should be used instead.
///
/// # Panics
Expand Down
8 changes: 4 additions & 4 deletions codegen/templates/quat.rs.tera
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,10 @@ impl {{ self_t }} {
const ONE_MINUS_EPS: {{ scalar_t }} = 1.0 - 2.0 * core::{{ scalar_t }}::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPS {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPS {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
use core::{{ scalar_t }}::consts::PI; // half a turn = 𝛕/2 = 180°
Self::from_axis_angle(from.any_orthonormal_vector(), PI)
} else {
Expand Down Expand Up @@ -454,10 +454,10 @@ impl {{ self_t }} {
const ONE_MINUS_EPSILON: {{ scalar_t }} = 1.0 - 2.0 * core::{{ scalar_t }}::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPSILON {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPSILON {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
const COS_FRAC_PI_2: {{ scalar_t }} = 0.0;
const SIN_FRAC_PI_2: {{ scalar_t }} = 1.0;
// rotation around z by PI radians
Expand Down
2 changes: 1 addition & 1 deletion src/f32/coresimd/mat4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ impl Mat4 {
/// `1.0`.
///
/// This method assumes that `self` contains a valid affine transform. It does not perform
/// a persective divide, if `self` contains a perspective transform, or if you are unsure,
/// a perspective divide, if `self` contains a perspective transform, or if you are unsure,
/// the [`Self::project_point3()`] method should be used instead.
///
/// # Panics
Expand Down
8 changes: 4 additions & 4 deletions src/f32/coresimd/quat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ impl Quat {
const ONE_MINUS_EPS: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPS {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPS {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
use core::f32::consts::PI; // half a turn = 𝛕/2 = 180°
Self::from_axis_angle(from.any_orthonormal_vector(), PI)
} else {
Expand Down Expand Up @@ -341,10 +341,10 @@ impl Quat {
const ONE_MINUS_EPSILON: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPSILON {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPSILON {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
const COS_FRAC_PI_2: f32 = 0.0;
const SIN_FRAC_PI_2: f32 = 1.0;
// rotation around z by PI radians
Expand Down
2 changes: 1 addition & 1 deletion src/f32/scalar/mat4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ impl Mat4 {
/// `1.0`.
///
/// This method assumes that `self` contains a valid affine transform. It does not perform
/// a persective divide, if `self` contains a perspective transform, or if you are unsure,
/// a perspective divide, if `self` contains a perspective transform, or if you are unsure,
/// the [`Self::project_point3()`] method should be used instead.
///
/// # Panics
Expand Down
8 changes: 4 additions & 4 deletions src/f32/scalar/quat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ impl Quat {
const ONE_MINUS_EPS: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPS {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPS {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
use core::f32::consts::PI; // half a turn = 𝛕/2 = 180°
Self::from_axis_angle(from.any_orthonormal_vector(), PI)
} else {
Expand Down Expand Up @@ -349,10 +349,10 @@ impl Quat {
const ONE_MINUS_EPSILON: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPSILON {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPSILON {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
const COS_FRAC_PI_2: f32 = 0.0;
const SIN_FRAC_PI_2: f32 = 1.0;
// rotation around z by PI radians
Expand Down
2 changes: 1 addition & 1 deletion src/f32/sse2/mat4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ impl Mat4 {
/// `1.0`.
///
/// This method assumes that `self` contains a valid affine transform. It does not perform
/// a persective divide, if `self` contains a perspective transform, or if you are unsure,
/// a perspective divide, if `self` contains a perspective transform, or if you are unsure,
/// the [`Self::project_point3()`] method should be used instead.
///
/// # Panics
Expand Down
8 changes: 4 additions & 4 deletions src/f32/sse2/quat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ impl Quat {
const ONE_MINUS_EPS: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPS {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPS {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
use core::f32::consts::PI; // half a turn = 𝛕/2 = 180°
Self::from_axis_angle(from.any_orthonormal_vector(), PI)
} else {
Expand Down Expand Up @@ -349,10 +349,10 @@ impl Quat {
const ONE_MINUS_EPSILON: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPSILON {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPSILON {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
const COS_FRAC_PI_2: f32 = 0.0;
const SIN_FRAC_PI_2: f32 = 1.0;
// rotation around z by PI radians
Expand Down
2 changes: 1 addition & 1 deletion src/f32/wasm32/mat4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ impl Mat4 {
/// `1.0`.
///
/// This method assumes that `self` contains a valid affine transform. It does not perform
/// a persective divide, if `self` contains a perspective transform, or if you are unsure,
/// a perspective divide, if `self` contains a perspective transform, or if you are unsure,
/// the [`Self::project_point3()`] method should be used instead.
///
/// # Panics
Expand Down
8 changes: 4 additions & 4 deletions src/f32/wasm32/quat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ impl Quat {
const ONE_MINUS_EPS: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPS {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPS {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
use core::f32::consts::PI; // half a turn = 𝛕/2 = 180°
Self::from_axis_angle(from.any_orthonormal_vector(), PI)
} else {
Expand Down Expand Up @@ -341,10 +341,10 @@ impl Quat {
const ONE_MINUS_EPSILON: f32 = 1.0 - 2.0 * core::f32::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPSILON {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPSILON {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
const COS_FRAC_PI_2: f32 = 0.0;
const SIN_FRAC_PI_2: f32 = 1.0;
// rotation around z by PI radians
Expand Down
2 changes: 1 addition & 1 deletion src/f64/dmat4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ impl DMat4 {
/// `1.0`.
///
/// This method assumes that `self` contains a valid affine transform. It does not perform
/// a persective divide, if `self` contains a perspective transform, or if you are unsure,
/// a perspective divide, if `self` contains a perspective transform, or if you are unsure,
/// the [`Self::project_point3()`] method should be used instead.
///
/// # Panics
Expand Down
8 changes: 4 additions & 4 deletions src/f64/dquat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ impl DQuat {
const ONE_MINUS_EPS: f64 = 1.0 - 2.0 * core::f64::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPS {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPS {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
use core::f64::consts::PI; // half a turn = 𝛕/2 = 180°
Self::from_axis_angle(from.any_orthonormal_vector(), PI)
} else {
Expand Down Expand Up @@ -338,10 +338,10 @@ impl DQuat {
const ONE_MINUS_EPSILON: f64 = 1.0 - 2.0 * core::f64::EPSILON;
let dot = from.dot(to);
if dot > ONE_MINUS_EPSILON {
// 0° singulary: from ≈ to
// 0° singularity: from ≈ to
Self::IDENTITY
} else if dot < -ONE_MINUS_EPSILON {
// 180° singulary: from ≈ -to
// 180° singularity: from ≈ -to
const COS_FRAC_PI_2: f64 = 0.0;
const SIN_FRAC_PI_2: f64 = 1.0;
// rotation around z by PI radians
Expand Down
2 changes: 1 addition & 1 deletion tests/euler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod support;
/// * `q`, if q.w > epsilon
/// * `-q`, if q.w < -epsilon
/// * `(0, 0, 0, 1)` otherwise
/// The rationale is that q and -q represent the same rotation, and any (_, _, _, 0) respresent no rotation at all.
/// The rationale is that q and -q represent the same rotation, and any (_, _, _, 0) represent no rotation at all.
trait CanonicalQuat: Copy {
fn canonical(self) -> Self;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/support/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ macro_rules! vec3_float_test_vectors {
$vec3::new(0.2, 0.3, 0.4),
$vec3::new(4.0, -5.0, 6.0),
$vec3::new(-2.0, 0.5, -1.0),
// Pathalogical cases from <https://graphics.pixar.com/library/OrthonormalB/paper.pdf>:
// Pathological cases from <https://graphics.pixar.com/library/OrthonormalB/paper.pdf>:
$vec3::new(0.00038527316, 0.00038460016, -0.99999988079),
$vec3::new(-0.00019813581, -0.00008946839, -0.99999988079),
]
Expand All @@ -212,7 +212,7 @@ macro_rules! vec2_float_test_vectors {
$vec2::new(0.2, 0.3),
$vec2::new(4.0, -5.0),
$vec2::new(-2.0, 0.5),
// Pathalogical cases from <https://graphics.pixar.com/library/OrthonormalB/paper.pdf>:
// Pathological cases from <https://graphics.pixar.com/library/OrthonormalB/paper.pdf>:
$vec2::new(0.00038527316, 0.00038460016),
$vec2::new(-0.00019813581, -0.00008946839),
]
Expand Down

0 comments on commit 1cd4995

Please sign in to comment.