Changed checking algorithm in triangle interpolation