Commit Graph

4 Commits

Author SHA1 Message Date
Markus Hitter 81f85b018d Move utility functions from dda.c to dda_math.c.
Simple cleanup, no functional change.
2012-08-04 22:07:24 +02:00
Markus Hitter 44be918d2a Introduce muldivQR().
This is a version of muldiv() with qn and rn precalculated,
so it can be avoided to re-calclulate it on every instance.

Yet another 116 bytes, unfortunately.
2012-08-04 22:01:30 +02:00
Markus Hitter a2f1412aec Make muldiv() multiplicand signed.
As Andrey correctly pointed out, we need this signed. See:
http://forums.reprap.org/read.php?147,89710,130225#msg-130225
and following posts.
2012-07-16 20:13:43 +02:00
Markus Hitter 7efb895ee3 Introduce an integer multiply-divide algorithm.
We have multiplies followed by divides all over the place and
most of them are difficult to handle regarding overflows. This
new algorithm handles this fine in all cases, as long as all
three operators and the overall result fits into 32 bits.
2012-07-16 20:13:29 +02:00