Functions | |
Byte | D4D_MulDivUU8 (Byte u1, Byte u2, Byte d) |
Simple proportion unsigned calculation - 8 bit. More... | |
sByte | D4D_MulDivSU8 (sByte s, Byte u, Byte d) |
Simple proportion signed calculation - 8 bit. More... | |
Word | D4D_MulDivUU16 (Word u1, Word u2, Word d) |
Simple proportion unsigned calculation - 16 bit. More... | |
sWord | D4D_MulDivSU16 (sWord s, Word u, Word d) |
Simple proportion signed calculation - 8 bit. More... | |
Byte | D4D_Abs (sByte num) |
Calculation of absolute value - 8 bit. More... | |
Word | D4D_Abs16 (sWord num) |
Calculation of absolute value - 16 bit. More... | |
LWord | D4D_Abs32 (sLWord num) |
Calculation of absolute value - 32 bit. More... | |
Word | D4D_LimitU16 (Word val, Word min, Word max) |
Calculation of limitation value (unsigned) - 16 bit. More... | |
sWord | D4D_LimitS16 (sWord val, sWord min, sWord max) |
Calculation of limitation value (signed) - 16 bit. More... | |
Byte | D4D_LimitU8 (Byte val, Byte min, Byte max) |
Calculation of limitation value (unsigned) - 8 bit. More... | |
sByte | D4D_LimitS8 (sByte val, sByte min, sByte max) |
Calculation of limitation value (signed) - 8 bit. More... | |
sByte | D4D_Sin (Byte x) |
Sine calculation using lookup table. More... | |
sByte | D4D_Cos (Byte x) |
Cosine calculation using lookup table. More... | |
This section specifies the exact usage for each API function.
Calculation of absolute value - 8 bit.
num | as signed integer <-128..-1,0..127> ~ <0xFF..0x80,0x00..0x7F> |
This function calculates the absolute value (unsigned) of argument num(signed)
Definition at line 306 of file d4d_math.c.
Calculation of absolute value - 16 bit.
num | as signed integer <-32768..-1,0..32767> ~ <0xFFFF..0x8000,0x00..0x7FFF> |
This function calculates the absolute value (unsigned) of argument num(signed)
Definition at line 325 of file d4d_math.c.
Calculation of absolute value - 32 bit.
num | as signed integer <-2,147,483,648..-1,0..2,147,483,647> ~ <0xFFFFFFFF..0x80000000,0x00000000..0x7FFFFFFF> |
This function calculates the absolute value (unsigned) of argument num(signed)
Definition at line 344 of file d4d_math.c.
Cosine calculation using lookup table.
x | as unsigned integer <0..0xFF> ~ <0..2PI) |
This function calculates the cosine value of argument phase 64 x 8 bit look-up table.
Definition at line 502 of file d4d_math.c.
Calculation of limitation value (signed) - 16 bit.
val | as signed integer <-32768..-1,0..32767> ~ <0xFFFF..0x8000,0x00..0x7FFF> - value that will be limited |
min | as signed integer <-32768..-1,0..32767> ~ <0xFFFF..0x8000,0x00..0x7FFF> - minimal limitation value |
max | as signed integer <-32768..-1,0..32767> ~ <0xFFFF..0x8000,0x00..0x7FFF> - maximal limitation value |
This function calculates the limitation of value by input value borders
Definition at line 394 of file d4d_math.c.
Calculation of limitation value (signed) - 8 bit.
val | as signed integer <-128..-1,0..127> ~ <0xFF..0x80,0x00..0x7F> - value that will be limited |
min | as signed integer <-128..-1,0..127> ~ <0xFF..0x80,0x00..0x7F> - minimal limitation value |
max | as signed integer <-128..-1,0..127> ~ <0xFF..0x80,0x00..0x7F> - maximal limitation value |
This function calculates the limitation of value by input value borders
Definition at line 448 of file d4d_math.c.
Calculation of limitation value (unsigned) - 16 bit.
val | as unsigned integer <0..0xFFFF> ~ <0..65535> - value that will be limited |
min | as unsigned integer <0..0xFFFF> ~ <0..65535> - minimal limitation value |
max | as unsigned integer <0..0xFFFF> ~ <0..65535> - maximal limitation value |
This function calculates the limitation of value by input value borders
Definition at line 367 of file d4d_math.c.
Calculation of limitation value (unsigned) - 8 bit.
val | as unsigned integer <0..0xFF> ~ <0..255> - value that will be limited |
min | as unsigned integer <0..0xFF> ~ <0..255> - minimal limitation value |
max | as unsigned integer <0..0xFF> ~ <0..255> - maximal limitation value |
This function calculates the limitation of value by input value borders
Definition at line 421 of file d4d_math.c.
Simple proportion signed calculation - 8 bit.
s | as signed integer <-32768..-1,0..32767> ~ <0xFFFF..0x8000,0x00..0x7FFF> |
u | as unsigned integer <0..0xFFFF> ~ <0..65535> |
d | (divider) as unsigned integer <0..0xFFFF> ~ <0..65535> |
This function calculates the simple proportion value of arguments (s*u) / d
Definition at line 276 of file d4d_math.c.
Simple proportion signed calculation - 8 bit.
s | as signed integer <-128..-1,0..127> ~ <0xFF..0x80,0x00..0x7F> |
u | as unsigned integer <0..0xFF> ~ <0..255> |
d | (divider) as unsigned integer <0..0xFF> ~ <0..255> |
This function calculates the simple proportion value of arguments (s*u) / d
Definition at line 225 of file d4d_math.c.
Simple proportion unsigned calculation - 16 bit.
u1 | as unsigned integer <0..0xFFFF> ~ <0..65535> |
u2 | as unsigned integer <0..0xFFFF> ~ <0..65535> |
d | (divider) as unsigned integer <0..0xFFFF> ~ <0..65535> |
This function calculates the simple proportion value of arguments (u1*u2) / d
Definition at line 257 of file d4d_math.c.
Simple proportion unsigned calculation - 8 bit.
u1 | as unsigned integer <0..0xFF> ~ <0..255> |
u2 | as unsigned integer <0..0xFF> ~ <0..255> |
d | (divider) as unsigned integer <0..0xFF> ~ <0..255> |
This function calculates the simple proportion value of arguments (u1*u2) / d
Definition at line 206 of file d4d_math.c.
Sine calculation using lookup table.
x | as unsigned integer <0..0xFF> ~ <0..2PI) |
This function calculates the sine value of argument phase 64 x 8 bit look-up table.
Definition at line 472 of file d4d_math.c.