Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #138

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and runs either on the desktop or as a web app.
cargo run --release -pconstraints
```

![screenshot of contraint editor](constraints/screenshot.png)
![screenshot of constraint editor](constraints/screenshot.png)

See the [subfolder](constraints/) for details on bundling for the web.

Expand Down
2 changes: 1 addition & 1 deletion fidget/src/core/compiler/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ impl<const N: usize> RegisterAllocator<N> {
fn release_mem(&mut self, mem: u32) {
assert!(mem >= N as u32);
self.spare_memory.push(mem);
// This leaves self.allocations[...] stil pointing to the memory slot,
// This leaves self.allocations[...] still pointing to the memory slot,
// but that's okay, because it should never be used
}

Expand Down
2 changes: 1 addition & 1 deletion fidget/src/core/shape/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ where
}
}

/// Trait for types that can be transformed by a 4x4 homogenous transform matrix
/// Trait for types that can be transformed by a 4x4 homogeneous transform matrix
pub trait Transformable {
/// Apply the given transform to an `(x, y, z)` position
fn transform(
Expand Down
2 changes: 1 addition & 1 deletion fidget/src/core/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub use data::{VmData, VmWorkspace};
/// there's no separate planning required to generate a tape.
pub type VmFunction = GenericVmFunction<{ u8::MAX as usize }>;

/// Shape that use a the [`VmFunction`] backend for evaluation
/// Shape that uses the [`VmFunction`] backend for evaluation
pub type VmShape = Shape<VmFunction>;

/// Tape storage type which indicates that there's no actual backing storage
Expand Down
4 changes: 2 additions & 2 deletions fidget/src/jit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ trait Assembler {

/// Minimum of two values
///
/// In a tracing evaluator, this function muld also write to the `choices`
/// In a tracing evaluator, this function must also write to the `choices`
/// array and may set `simplify` if one branch is always taken.
fn build_min(&mut self, out_reg: u8, lhs_reg: u8, rhs_reg: u8);

Expand All @@ -235,7 +235,7 @@ trait Assembler {

// Special-case functions for immediates. In some cases, you can be more
// efficient if you know that an argument is an immediate (for example, both
// values in the interval will be the same, and it wlll have no gradients).
// values in the interval will be the same, and it will have no gradients).

/// Builds a addition (immediate + register)
///
Expand Down
2 changes: 1 addition & 1 deletion fidget/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
//!
//! # Functions and shapes
//! The [`Function`](crate::eval::Function) trait supports arbitrary numbers of
//! varibles; when using it for implicit surfaces, it's common to wrap it in a
//! variables; when using it for implicit surfaces, it's common to wrap it in a
//! [`Shape`](crate::shape::Shape), which binds `(x, y, z)` axes to specific
//! variables.
//!
Expand Down
4 changes: 2 additions & 2 deletions fidget/src/mesh/qef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl QuadraticErrorSolver {
/// Solve the given QEF, minimizing towards the mass point
///
/// Returns a vertex localized within the given cell, and adjusts the solver
/// to increase the likelyhood that the vertex is bounded in the cell.
/// to increase the likelihood that the vertex is bounded in the cell.
///
/// Also returns the QEF error as the second item in the tuple
pub fn solve(&self) -> (CellVertex, f32) {
Expand All @@ -83,7 +83,7 @@ impl QuadraticErrorSolver {
.last()
.unwrap_or(0);

// "Dual Contouring: The Secret Sauce" recomments a threshold of 0.1
// "Dual Contouring: The Secret Sauce" recommends a threshold of 0.1
// when using normalized gradients, but I've found that fails on
// things like the cone model. Instead, we'll be a little more
// clever: we'll pick the smallest epsilon that keeps the feature in
Expand Down
4 changes: 2 additions & 2 deletions fidget/src/render/render2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl RenderMode for BitRenderMode {
}
}

/// Pixel-perfect render mode which mimicks many SDF demos on ShaderToy
/// Pixel-perfect render mode which mimics many SDF demos on ShaderToy
///
/// This mode recurses down to individual pixels, so it doesn't take advantage
/// of skipping empty / full regions; use [`SdfRenderMode`] for a
Expand Down Expand Up @@ -160,7 +160,7 @@ impl RenderMode for SdfPixelRenderMode {
}
}

/// Fast rendering mode which mimicks many SDF demos on ShaderToy
/// Fast rendering mode which mimics many SDF demos on ShaderToy
///
/// Unlike [`SdfPixelRenderMode`], this mode uses linear interpolation when
/// evaluating empty or full regions, which is significantly faster.
Expand Down
2 changes: 1 addition & 1 deletion fidget/src/solver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ pub fn solve<F: Function>(
// Update our current position, checking whether it actually changed
// (i.e. whether our steps are below the floating-point epsilon)
//
// TODO: improve exit critera?
// TODO: improve exit criteria?
let mut changed = false;
for gi in 0..solver.grad_index.len() {
let prev = cur[gi];
Expand Down