Temp curve maths