#include <mod128.h>
Definition at line 29 of file mod128.h.
◆ DIR128() [1/3]
◆ DIR128() [2/3]
DIR128::DIR128 |
( |
int16_t |
value | ) |
|
|
inline |
Definition at line 34 of file mod128.h.
35 {
37 if (value < 0)
39 dir = static_cast<int8_t>(value);
40 }
◆ DIR128() [3/3]
DIR128::DIR128 |
( |
const FCOORD |
fc | ) |
|
Definition at line 64 of file mod128.cpp.
66 {
67 int high, low, current;
68
69 low = 0;
72 dir = 0;
73 else
75 return;
76 }
78 do {
79 current = (high + low) / 2;
80 if (dirtab[current] * fc >= 0)
81 low = current;
82 else
83 high = current;
84 }
85 while (high - low > 1);
86 dir = low;
87}
◆ get_dir()
int8_t DIR128::get_dir |
( |
| ) |
const |
|
inline |
◆ operator+()
Definition at line 63 of file mod128.h.
65 {
67
68 result = dir + add.dir;
69 return result;
70 }
◆ operator+=()
Definition at line 71 of file mod128.h.
72 {
73 *this = dir + add.dir;
74 return *this;
75 }
◆ operator-()
int8_t DIR128::operator- |
( |
const DIR128 & |
minus | ) |
const |
|
inline |
Definition at line 51 of file mod128.h.
53 {
54
55 int16_t result = dir - minus.dir;
56
61 return static_cast<int8_t>(result);
62 }
◆ operator=()
DIR128 & DIR128::operator= |
( |
int16_t |
value | ) |
|
|
inline |
Definition at line 43 of file mod128.h.
44 {
46 if (value < 0)
48 dir = static_cast<int8_t>(value);
49 return *this;
50 }
The documentation for this class was generated from the following files: