Instrument for measuring angles