Fix maths for interpolation