you don't need two different functions for left and right triangle
you don't need two different functions for left and right triangle