Skip to content

Commit

Permalink
tests: fix randomUnitVector test
Browse files Browse the repository at this point in the history
Uses `toBeCloseTo` rather than `toBe`.
  • Loading branch information
jakebeamish authored Sep 13, 2024
1 parent 7c38795 commit 97bfc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/tests/Random.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe("PRNG", () => {
let prng = new Mulberry32();
let vector = prng.randomUnitVector();
expect(vector instanceof Vector).toBeTruthy();
expect(vector.getMagnitude()).toBe(1);
expect(vector.getMagnitude()).toBeCloseTo(1);
});
});

Expand Down

0 comments on commit 97bfc5a

Please sign in to comment.