26 #define DIRBITS 7 //no of bits used
27 #define DIRSCALE 1000 //length of vector
39 dir = static_cast<int8_t>(value);
48 dir = static_cast<int8_t>(value);
52 const DIR128 & minus)
const
55 int16_t result = dir - minus.dir;
61 return static_cast<int8_t>(result);
68 result = dir + add.dir;
73 *
this = dir + add.dir;
76 int8_t get_dir()
const {