Call the angle of elevation A. The ramp is the hypotenuse of a right triangle with acute angle A. The length of the side opposite angle A equals the height above the ground of the other end of the ramp, so . The length of the side adjacent to angle A equals the horizontal distance to the building, so
. This means that:
So: