#include "handy.h"
#include <string.h>  //for strchr and strcpy


double sign(double a, double b) {
  if(b >= 0.0) return fabs(a);
  return -fabs(a);
}


double max(double a, double b) {
  if(a > b) return a;
  return b;
}


//strips the path off of a filename
void strip_path(char *name) {
  char *temp;
  temp = strrchr(name, '/');
  if(temp != NULL) strcpy(name, temp + 1);
}
