Skip to content

Commit

Permalink
fix the test assertion labels for vecX.setLength functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mreinstein committed Mar 25, 2024
1 parent 6525ae2 commit 543327f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vec2-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ export function rotate(a: Vec2, b: Vec2, rad: number, dst?: Vec2) {
/**
* Treat a 2D vector as a direction and set it's length
*
* @param a The vec2 to length
* @param a The vec2 to lengthen
* @param len The length of the resulting vector
* @returns The lengthened vector
*/
Expand Down
2 changes: 1 addition & 1 deletion src/vec3-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ export function rotateZ(a: Vec3, b: Vec3, rad: number, dst?: Vec3) {
/**
* Treat a 3D vector as a direction and set it's length
*
* @param a The vec3 to length
* @param a The vec3 to lengthen
* @param len The length of the resulting vector
* @returns The lengthened vector
*/
Expand Down
2 changes: 1 addition & 1 deletion src/vec4-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ export function transformMat4(v: Vec4, m: Mat4, dst?: Vec4): Vec4 {
/**
* Treat a 4D vector as a direction and set it's length
*
* @param a The vec3 to length
* @param a The vec3 to lengthen
* @param len The length of the resulting vector
* @returns The lengthened vector
*/
Expand Down
2 changes: 1 addition & 1 deletion test/tests/vec2-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ describe('vec2', () => {
vecA = [1, 1];
result = vec2.setLength(vecA, 14.6);
});
it("should return the rotated vector", function () {
it("should return the lengthend vector", function () {
assertEqualApproximately(result, [10.323759005323593, 10.323759005323593]);
assertEqualApproximately(vec2.length(result), 14.6);
});
Expand Down
2 changes: 1 addition & 1 deletion test/tests/vec3-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ describe('vec3', () => {
vecA = [1, 1, 1];
result = vec3.setLength(vecA, 14.6);
});
it("should return the rotated vector", function () {
it("should return the lengthened vector", function () {
assertEqualApproximately(result, [8.429313930168536, 8.429313930168536, 8.429313930168536]);
assertEqualApproximately(vec3.length(result), 14.6);
});
Expand Down
2 changes: 1 addition & 1 deletion test/tests/vec4-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ describe('vec4', () => {
vecA = [1, 1, 1, 1];
result = vec4.setLength(vecA, 14.6);
});
it("should return the rotated vector", function () {
it("should return the lengthened vector", function () {
assertEqualApproximately(result, [7.3, 7.3, 7.3, 7.3]);
assertEqualApproximately(vec4.length(result), 14.6);
});
Expand Down

0 comments on commit 543327f

Please sign in to comment.