local l=_Tune.Horsepower/100 local a=_Tune.PeakRPM/1000 local d=_Tune.PeakSharpness local u=_Tune.CurveMult function FGC(n)n=n/1000 return(-(n-a)^2*math.min(l/a^2,u^(a/l))+l)*(n-n^d/(d*a)^(d-1))end local n=FGC(_Tune.PeakRPM)

local fgc_h=_Tune.Horsepower/100
local fgc_n=_Tune.PeakRPM/1000
local fgc_a=_Tune.PeakSharpness
local fgc_c=_Tune.CurveMult

function FGC(x)
	x=x/1000
	return (((-(x-fgc_n)^2)*math.min(fgc_h/(fgc_n^2),fgc_c^(fgc_n/fgc_h)))+fgc_h)*(x-((x^fgc_a)/((fgc_a*fgc_n)^(fgc_a-1))))
end
local PeakFGC = FGC(_Tune.PeakRPM)
