this.opp = opp; this.adj = adj;
// the area of a right angled triangle // is half the opposite * the adjacent return 0.5 * opp * adj;
// calculate the area of the RH triangle // using Pythagoras's theorem... return (opp + adj + Math.sqrt(opp*opp+adj*adj));