Hey there. I've been coding with JS recently, a little bit with the wonderful p5.js library. I'm wondering how I would go about converting the p5.js map function to Lua, specifically Roblox.
p5.js Description:
Re-maps a number from one range to another.
p5.js Parameters:
value: Number: the incoming value to be converted
start1: Number: lower bound of the value's current range
stop1: Number: upper bound of the value's current range
start2: Number: lower bound of the value's target range
stop2: Number: upper bound of the value's target range
withinBounds: Boolean: constrain the value to the newly mapped range
I'm just not exactly sure of the math or steps needed to get this to work in RbxLua. If someone could point me in the right direction that'd be fantastic!
