37 uint8_t uint8_tDiv(uint8_t n, uint8_t d)
49 uint8_t uint8_tRnd(uint8_t min, uint8_t max)
52 seed = (21 * seed + 21);
53 return min + uint8_tMod(seed, --max);
64 int ipow(
int base,
int exp)
109 uint8_t Q = (uint8_t)((Q8n8)exponent>>8);
110 uint8_t n = (uint8_t) exponent;
125 root, remainder, place;
131 while (place > remainder)
135 if (remainder >= root + place)
137 remainder = remainder - root - place;
138 root = root + (place << 1);
152 root, remainder, place;
158 while (place > remainder)
162 if (remainder >= root + place)
164 remainder = remainder - root - place;
165 root = root + (place << 1);
uint16_t Q8n8
unsigned fractional number using 8 integer bits and 8 fractional bits, represents 0 to 255...
#define Q8n8_FIX1
1 in Q8n8 format
uint8_t uint8_tMod(uint8_t n, uint8_t d)
fast uint8_t modulus
uint32_t Q16n16
unsigned fractional number using 16 integer bits and 16 fractional bits, represents 0 to 65535...