Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
vecfuncs.cpp File Reference
`#include "mfcpch.h"`
`#include "vecfuncs.h"`

Go to the source code of this file.

## Functions

int | direction (EDGEPT *point)

## Function Documentation

int direction | ( | EDGEPT * | point | ) |

direction to return

prev point

next point

Definition at line 43 of file vecfuncs.cpp.

{
int dir;
EDGEPT *prev;
EDGEPT *next;
dir = 0;
prev = point->prev;
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;
}