class to measure length, angle and torsion