Anons, please help me with some math

No.13635035 ViewReplyOriginalReport
Good evening anyone who wants to help: I'm programming for a SS13 server, and I want the player's chosen strength stat (1-9) to have a multiplicative effect on melee weapon damage, with the effects being positive for each point above 5 and negative for each below. I was thinking + or - 10% for each above or below.

I need to write an equation within this file I'm working on, that would add such an effect to an already existing variable called "force", which designates an incoming melee impact in the code and is a set integer depending on the source of damage. Any help in this regard from people who aren't stoned as fuck right now like I am would be greatly appreciated.