From fcf2135a6d2943b7cbcef8800c584ba2d4eb577b Mon Sep 17 00:00:00 2001 From: RoxaneBurri Date: Mon, 13 Mar 2023 12:52:38 +0100 Subject: [PATCH] feat: function return type --- src/utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index a7f63a7..7d7e4b3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -58,11 +58,10 @@ export const setFirstWordInCenterOfParent = (w: Word, p: string): Rectangle => { }; // This function put the word in a random place -export const placeWordOnOuterCircle = (w: Rectangle) => { +export const placeWordOnOuterCircle = (w: Rectangle): Rectangle => { // Chose the parent face const angle = Math.random() * 360; const radius = Math.max(CONTAINER_HEIGHT, CONTAINER_WIDTH) / 2; - console.log(angle); const newPosition = { ...w, x: radius * Math.cos(angle) + CENTER_X, @@ -91,7 +90,7 @@ export const futurPosition = ( word: Rectangle, passRect: Rectangle[], step: number -) => { +): Rectangle => { let isCollision = false; let movedWord: Rectangle = { x: word.x,