I'm returning to my engine after more than a month and man wtf was I doing. I put the same function in a util file and in the Entity class WHICH ONE IS THE RIGHT ONE