uses PointF instead of dist, removes dist