Question 727969
You have 2 legs that form the right angle and
you have the hypotenuse that connects them
If the legs are {{{ a }}} and {{{ b }}} and the
hypotenuse is {{{ c }}}, then the formula is:
{{{ c = sqrt( a^2 + b^2 ) }}}
------------------------
If the {{{ a }}} leg is horizontal and the {{{ b }}}
leg is vertical, then you have:
{{{ c = sqrt( ( x[2] - x[1] )^2 + ( y[2] - y[1] )^2 ) }}}
This is when:
( x[1], y[1] ) are the coordinates of one end of the hypotenuse
( x[2], y[2] ) are the coordinates of the other end of the hypotenuse
------------------------
If your points were ( 5,7 ) and (-1, 4 ) then
{{{ c = sqrt( ( -1 -5 )^2 + ( 4 - 7 )^2 ) }}}
{{{ c = sqrt( (-6)^2 + (-3)^2 ) }}}
{{{ c = sqrt( 36 + 9 ) }}}
{{{ c = sqrt( 45 ) }}}
{{{ c = 3*sqrt( 5 ) }}}
------------------
Hope this helps