RS_Vector RS_EntityContainer::getNearestDist(double distance,
                                             const RS_Vector& coord,
											 double* dist) const{

    RS_Vector point(false);
    RS_Entity* closestEntity;

	closestEntity = getNearestEntity(coord, nullptr, RS2::ResolveNone);

	if (closestEntity) {
        point = closestEntity->getNearestDist(distance, coord, dist);
    }

    return point;
}