Just to pick an extreme number, let's say the wall angle is 120 degrees, so you need to 60 degree cuts. Set you saw to the complement of 60 i.e. 90-60=30 degrees. This is hard to explain without pictures, but the sixty degree angle is with respect to the wall, your miter saw is graduated with respect to what would be a perpendicular to the wall, so if you set it to 30 degrees it will create an angle that is 60 degrees to the back fence or where the wall would be. Just try it on some scrap, it's much more complicated to explain than to do.