# test

## Setup

``````let position = {x:0,y:0,z:0}

position.x = Math.random()
position.y = Math.random()
position.z = Math.random()

let width =Math.random()
let height =Math.random()
let depth =Math.random()
``````

## Test runner

Testing in
TestOps/sec
1
``````
let corners = [];

let signs = [[-1, -1, -1], [-1, -1, 1], [-1, 1, -1], [-1, 1, 1], [1, -1, -1], [1, -1, 1], [1, 1, -1], [1, 1, 1]];

for (let i = 0; i < signs.length; i++) {
let corner = {};
corner.x = position.x + signs[i] * width * 0.5; corner.y = position.y + signs[i] * height * 0.5; corner.z = position.z + signs[i] * depth * 0.5;  corners.push(corner); }``````
2
`````` let corners = [];

let corner1 = { x: position.x - width * 0.5, y: position.y - height * 0.5, z: position.z - depth * 0.5 }; // On ajoute le coin au tableau corners.push(corner1);

let corner2 = { x: position.x + width * 0.5, y: position.y - height * 0.5, z: position.z - depth * 0.5 }; // On ajoute le coin au tableau corners.push(corner2);
let corner3 = { x: position.x + width * 0.5, y: position.y + height * 0.5, z: position.z - depth * 0.5 }; // On ajoute le coin au tableau corners.push(corner3);

let corner4 = { x: position.x - width * 0.5, y: position.y + height * 0.5, z: position.z - depth * 0.5 };

let corner5 = { x: position.x - width * 0.5, y: position.y - height * 0.5, z: position.z + depth * 0.5 }; // On ajoute le coin au tableau corners.push(corner5);
let corner6 = { x: position.x + width * 0.5, y: position.y - height * 0.5, z: position.z + depth * 0.5 }; // On ajoute le coin au tableau corners.push(corner6);

let corner7 = { x: position.x + width * 0.5, y: position.y + height * 0.5, z: position.z + depth * 0.5 }; // On ajoute le coin au tableau corners.push(corner7);

let corner8 = { x: position.x - width * 0.5, y: position.y + height * 0.5, z: position.z + depth * 0.5};
// On ajoute le coin au tableau
corners.push(corner8);``````