added test to confirm that absolute value component of distance function works properly