How to increase or decrease a number by a percent?

I have a status effect system and I want some effects to increase or decrease a number by a percent for example I have a poison effect that I want to make decrease the player’s movement speed by 10%.

I made this function

-- to decrease just make percent a negative number.
function Utils:IncreaseNumByPercent(number : number, percent : number)
	local result = math.floor(number * (1 + (percent/100)))
	return result
end

but I’m not entirely sure if this is actually how you calculate this.

Remove math.floor; that’s rounds the number down to a whole number


Yes, however, reply to me if you don’t get the desired outcome

Oh so besides from that my calculations is correct?