Fix date_Increment when i_divider_den > 1
Previously, calling date_Increment(d,1) with divider_den > 1 would cause:
- Uncorrectable rounding error due to ordering of / followed by *
- If i_divider_num / i_divider_den is not integral, a remainder is
accumulated, but not divided by i_divider_num when added to date.
=> Both cases are evident with num=30000, den=1001.
This fixes both issues.
Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Showing
Please register or sign in to comment