Shortest ladder

There is an abutment at the base of a wall.[br][br]How does the length of a ladder leaning against the wall vary with the angle shown [br]in the diagram?[br][br]For a given size abutment, is there a shortest ladder? If so, what is that length?[br][br]You can adjust the size of the abutment by dragging the GREEN dot.[br]You can adjust the angle of the ladder by dragging the RED dot.[br][br]Does your solution behave reasonably in limiting cases? in interesting cases?
Adapted from "Calculus: The Analysis of Functions" by P.D. Taylor

Information: Shortest ladder