You have to halve the angle of the corners and then set the saw to that angle. Remember that not all walls are exactly 90 degrees so just setting the saw to 45 degrees may give you a less than perfect fit. A handy tool for measuring the angle and setting the saw is the AngleFix guide from a company called Trend