added getDistanceToLine to CPosition and corrected errors in CWalker