src/wordrec/chop.cpp
static int direction(const EDGEPT *point) {
  //* direction to return
  int dir = 0;
  //* prev point
  const EDGEPT *prev = point->prev;
  //* next point
  const EDGEPT *next = point->next;

  if (((prev->pos.x <= point->pos.x) && (point->pos.x < next->pos.x)) ||
      ((prev->pos.x < point->pos.x) && (point->pos.x <= next->pos.x))) {
    dir = 1;
  }
  if (((prev->pos.x >= point->pos.x) && (point->pos.x > next->pos.x)) ||
      ((prev->pos.x > point->pos.x) && (point->pos.x >= next->pos.x))) {
    dir = -1;
  }

  return dir;
}
// Show if the line is going in the positive or negative X direction.
Show if the line is going in the positive or negative X direction.
Show if the line is going in the positive or negative X direction .
static int direction(const EDGEPT *point) {
  int dir = 0;
  const EDGEPT *prev = point->prev;
  const EDGEPT *next = point->next;
  if (((prev->pos.x <= point->pos.x) && (point->pos.x < next->pos.x)) ||
      ((prev->pos.x < point->pos.x) && (point->pos.x <= next->pos.x))) {
    dir = 1;
  }
  if (((prev->pos.x >= point->pos.x) && (point->pos.x > next->pos.x)) ||
      ((prev->pos.x > point->pos.x) && (point->pos.x >= next->pos.x))) {
    dir = -1;
  }
  return dir;
}
static int direction ( const EDGEPT * point ) { int dir = 0 ; const EDGEPT * prev = point -> prev ; const EDGEPT * next = point -> next ; if ( ( ( prev -> pos . x <= point -> pos . x ) && ( point -> pos . x < next -> pos . x ) ) || ( ( prev -> pos . x < point -> pos . x ) && ( point -> pos . x <= next -> pos . x ) ) ) { dir = 1 ; } if ( ( ( prev -> pos . x >= point -> pos . x ) && ( point -> pos . x > next -> pos . x ) ) || ( ( prev -> pos . x > point -> pos . x ) && ( point -> pos . x >= next -> pos . x ) ) ) { dir = -1 ; } return dir ; }
Show if the line is going in the positive or negative X direction.
Show if the line is going in the positive or negative X direction .
//* direction to return //* prev point //* next point