formula for calculating height in triangle