chore(web): Apply suggestions from code review

Co-authored-by: Marc Durdin <marc@durdin.net>
This commit is contained in:
Joshua Horton 2023-10-20 16:21:20 +07:00 committed by GitHub
parent 684b6235eb
commit 5c74e4ced2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ export interface CorrectionLayout {
/**
* Defines the mappings of each key to be considered by a key-correction
* algorithm. The key's bounding box should be defined relative to its
* containers bounding box, with both mapped to a coordinate system from
* container's bounding box, with both mapped to a coordinate system from
* <0, 0> to <1, 1> - a unit square.
*/
keys: CorrectionLayoutEntry[];

View file

@ -12,7 +12,7 @@ import { CorrectionLayout } from "./correctionLayout.js";
export function keyTouchDistances(touchCoords: {x: number, y: number}, correctiveLayout: CorrectionLayout): Map<string, number> {
let keyDists: Map<string, number> = new Map<string, number>();
// This double-nested loop computes a pseudo-distance for the touch from each key. Quite useful for
// This loop computes a pseudo-distance for the touch from each key. Quite useful for
// generating a probability distribution.
correctiveLayout.keys.forEach((entry) => {
// These represent the within-key distance of the touch from the key's center.