I want to write a function in lua that given a number from 0 to 1, it decreases proportionally another number from 0.1 to 0.001.
I tried to apply the proportional inverse y=1/x but is not working as I think it does or i'm doing it wrong. What principles should I apply here?
This is what I have:
local input = read_float(heatPath+offset)
local heat = input
local time = read_float(timePath+offset)
If heat ~= 0 then
local heat_increment = heat * 10
local new_time = heat_increment/time
Edit: So, a guy told me that is more complex than that. Something involving a derivative and an integral. Honestly I don't have idea how to do that. I'll appreciate any help or guidance regarding that.