Skip to content

Instantly share code, notes, and snippets.

@franciscoadasme
Created September 21, 2011 19:27
Show Gist options
  • Save franciscoadasme/1233050 to your computer and use it in GitHub Desktop.
Save franciscoadasme/1233050 to your computer and use it in GitHub Desktop.
How to access points inside window
void APNpSeeker::run()
{
while (walkable()) {
QList<float> pointsInsideWindow = QList<float>();
for (int i = left(); i < right(); ++i) {
pointsInsideWindow.append( points.at(i) );
}
float average = sum(pointsInsideWindow) / points.length();
moveForth();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment