pedsim_simulator/src/scene.cpp
// find the attraction with minimal distance
find the attraction with minimal distance
find the attraction with minimal distance
foreach (AttractionArea* attraction, attractions) {
        double distance = (attraction->getPosition() - positionIn).length();
        if (distance < minDistance) {
            minDistance = distance;
            minArg = attraction;
        }
    }
foreach ( AttractionArea * attraction , attractions ) { double distance = ( attraction -> getPosition ( ) - positionIn ) . length ( ) ; if ( distance < minDistance ) { minDistance = distance ; minArg = attraction ; } }
find the attraction with minimal distance
find the attraction with minimal distance