chore: fix spelling errors

This commit is contained in:
Raymond Hear 2025-03-28 14:33:53 -04:00
parent 0cd5a259ae
commit e3bdb9f5cd
40 changed files with 75 additions and 75 deletions

View file

@ -67,7 +67,7 @@ export const ellipseIncludesPoint = <Point extends GlobalPoint | LocalPoint>(
* @param point The point to test
* @param ellipse The ellipse to compare against
* @param threshold The distance to consider a point close enough to be "on" the outline
* @returns TRUE if the point is on the ellise outline
* @returns TRUE if the point is on the ellipse outline
*/
export const ellipseTouchesPoint = <Point extends GlobalPoint | LocalPoint>(
point: Point,
@ -83,7 +83,7 @@ export const ellipseTouchesPoint = <Point extends GlobalPoint | LocalPoint>(
*
* @param p The point to consider
* @param ellipse The ellipse to calculate the distance to
* @returns The eucledian distance
* @returns The euclidean distance
*/
export const ellipseDistanceFromPoint = <
Point extends GlobalPoint | LocalPoint,
@ -137,7 +137,7 @@ export const ellipseDistanceFromPoint = <
};
/**
* Calculate a maximum of two intercept points for a line going throug an
* Calculate a maximum of two intercept points for a line going through an
* ellipse.
*/
export function ellipseSegmentInterceptPoints<

View file

@ -47,7 +47,7 @@ export const rangesOverlap = (
};
/**
* Given two ranges,return ther intersection of the two ranges if any e.g. the
* Given two ranges, return the intersection of the two ranges if any e.g. the
* intersection of [1, 3] and [2, 4] is [2, 3].
*
* @param param0 The first range to compare

View file

@ -1,7 +1,7 @@
import type { GlobalPoint, LocalPoint, Vector } from "./types";
/**
* Create a vector from the x and y coordiante elements.
* Create a vector from the x and y coordinate elements.
*
* @param x The X aspect of the vector
* @param y T Y aspect of the vector
@ -20,7 +20,7 @@ export function vector(
* Turn a point into a vector with the origin point.
*
* @param p The point to turn into a vector
* @param origin The origin point in a given coordiante system
* @param origin The origin point in a given coordinate system
* @returns The created vector from the point and the origin
*/
export function vectorFromPoint<Point extends GlobalPoint | LocalPoint>(
@ -36,7 +36,7 @@ export function vectorFromPoint<Point extends GlobalPoint | LocalPoint>(
*
* @param a One of the vectors to use for the directed area calculation
* @param b The other vector to use for the directed area calculation
* @returns The directed area value for the two vectos
* @returns The directed area value for the two vectors
*/
export function vectorCross(a: Vector, b: Vector): number {
return a[0] * b[1] - b[0] * a[1];
@ -108,7 +108,7 @@ export function vectorScale(v: Vector, scalar: number): Vector {
}
/**
* Calculates the sqare magnitude of a vector. Use this if you compare
* Calculates the square magnitude of a vector. Use this if you compare
* magnitudes as it saves you an SQRT.
*
* @param v The vector to measure
@ -129,7 +129,7 @@ export function vectorMagnitude(v: Vector) {
}
/**
* Normalize the vector (i.e. make the vector magnitue equal 1).
* Normalize the vector (i.e. make the vector magnitude equal 1).
*
* @param v The vector to normalize
* @returns The new normalized vector