update triangle determine function