Here are two possible solutions. There are more... The difference is where the pivot point is placed. The top solution places it on the right. The bottom solution places it on the left. Both solution will work.
The solution below shows the distance as being measured from the other left instead of the right. The distance's starting point can be anywhere.