Or, do it with trig: c=b/(sin(arctan b/a))
Wouldn't you need to know the angles of the triangle for that?