AFM: Correctly calculating angles, applying rule 1.