#include <mod128.h>
Definition at line 30 of file mod128.h.
◆ DIR128() [1/3]
tesseract::DIR128::DIR128 |
( |
| ) |
|
|
default |
◆ DIR128() [2/3]
tesseract::DIR128::DIR128 |
( |
int16_t |
value | ) |
|
|
inline |
◆ DIR128() [3/3]
tesseract::DIR128::DIR128 |
( |
const FCOORD |
fc | ) |
|
Definition at line 51 of file mod128.cpp.
53 {
54 int high, low, current;
55
56 low = 0;
57 if (fc.y() == 0) {
58 if (fc.x() >= 0) {
60 } else {
62 }
63 return;
64 }
66 do {
67 current = (high + low) / 2;
68 if (dirtab[current] * fc >= 0) {
69 low = current;
70 } else {
71 high = current;
72 }
73 } while (high - low > 1);
75}
◆ get_dir()
int8_t tesseract::DIR128::get_dir |
( |
| ) |
const |
|
inline |
◆ operator+()
DIR128 tesseract::DIR128::operator+ |
( |
const DIR128 & |
add | ) |
const |
|
inline |
Definition at line 66 of file mod128.h.
68 {
70
71 result =
dir + add.dir;
72 return result;
73 }
◆ operator+=()
DIR128 & tesseract::DIR128::operator+= |
( |
const DIR128 & |
add | ) |
|
|
inline |
Definition at line 74 of file mod128.h.
75 {
76 *
this =
dir + add.dir;
77 return *this;
78 }
◆ operator-()
int8_t tesseract::DIR128::operator- |
( |
const DIR128 & |
minus | ) |
const |
|
inline |
Definition at line 53 of file mod128.h.
55 {
56
57 int16_t result =
dir - minus.dir;
58
61 }
else if (result < -
MODULUS / 2) {
63 }
64 return static_cast<int8_t>(result);
65 }
◆ operator=()
DIR128 & tesseract::DIR128::operator= |
( |
int16_t |
value | ) |
|
|
inline |
Definition at line 44 of file mod128.h.
45 {
49 }
51 return *this;
52 }
◆ dir
int8_t tesseract::DIR128::dir |
The documentation for this class was generated from the following files:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccstruct/mod128.h
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccstruct/mod128.cpp