private double calculateDistanceBetweenTwoAtoms ( IAtom atom1 , IAtom atom2 ) { double distance ; Point3d firstPoint = atom1 . getPoint3d ( ) ; Point3d secondPoint = atom2 . getPoint3d ( ) ; distance = firstPoint . distance ( secondPoint ) ; return distance ; }
generic method for calculation of distance btw 2 atoms