#==================== # R function to calculate hypotenuse length # from other two side lengths for a right # triangle. Argument x is vector of two # side lengths. #==================== length.hyp=function(x) { h=sqrt(sum(x^2)) return(h) }