mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2025-10-09 16:46:00 +00:00
Pauser, game modal launcher
This commit is contained in:
13
tests/utils/arrayUtils.test.ts
Normal file
13
tests/utils/arrayUtils.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { shuffle } from "../../assets/Scripts/Services/Utils/ArrayUtils";
|
||||
|
||||
test("shuffle shuffles the array", () => {
|
||||
const array: number[] = [0, 1, 2, 3, 4, 5, 6];
|
||||
const shuffledArray: number[] = shuffle(array);
|
||||
|
||||
let positionsShuffled = 0;
|
||||
for (let i = 0; i < shuffledArray.length; i++) {
|
||||
if (shuffledArray[i] != i) positionsShuffled++;
|
||||
}
|
||||
|
||||
expect(positionsShuffled).toBeGreaterThan(3);
|
||||
});
|
@@ -1,13 +0,0 @@
|
||||
test("try ", () => {
|
||||
const x = 200;
|
||||
const y = -100;
|
||||
|
||||
const atan = Math.atan(Math.abs(y) / Math.abs(x));
|
||||
|
||||
console.log(Math.sin(atan) * y);
|
||||
console.log(Math.cos(atan) * x);
|
||||
|
||||
expect(true).toBeTruthy();
|
||||
});
|
||||
|
||||
export {};
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "62fcbd59-7ce1-4582-91c1-e502763b791b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user