Use sqrt instead of trig_dist, as trig_dist returns int