Skip to content

Instantly share code, notes, and snippets.

@andrebrait
Created January 3, 2019 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrebrait/0dee78c54244cda55682816653a730de to your computer and use it in GitHub Desktop.
Save andrebrait/0dee78c54244cda55682816653a730de to your computer and use it in GitHub Desktop.
static double distance(double x1, double y1, double x2, double y2) {
double dx = x2 - x1;
double dy = y2 - y1;
return Math.sqrt((dx * dx) + (dy * dy));
}
static double constant(double x1, double y1, double x2, double y2) {
return 0.0d;
}
static void nothing() {
// this really does nothing
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment