#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 |
Definition at line 34 of file mod128.h.
40 dir =
static_cast<int8_t
>(value);
◆ DIR128() [3/3]
tesseract::DIR128::DIR128 |
( |
const FCOORD |
fc | ) |
|
Definition at line 51 of file mod128.cpp.
54 int high, low, current;
67 current = (high + low) / 2;
68 if (dirtab[current] * fc >= 0) {
73 }
while (high - low > 1);
◆ 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.
71 result =
dir + add.dir;
◆ operator+=()
Definition at line 74 of file mod128.h.
76 *
this =
dir + add.dir;
◆ operator-()
int8_t tesseract::DIR128::operator- |
( |
const DIR128 & |
minus | ) |
const |
|
inline |
Definition at line 53 of file mod128.h.
57 int16_t result =
dir - minus.dir;
61 }
else if (result < -
MODULUS / 2) {
64 return static_cast<int8_t
>(result);
◆ operator=()
DIR128& tesseract::DIR128::operator= |
( |
int16_t |
value | ) |
|
|
inline |
Definition at line 44 of file mod128.h.
50 dir =
static_cast<int8_t
>(value);
◆ dir
int8_t tesseract::DIR128::dir |
The documentation for this class was generated from the following files: