Adds toNearest tests for numbers to round that are less-than-even

This will test numbers that are less than half the first argument (y) of the toNearest function.
If the y value is ten, the decimal value on which toNearest is tested will be a multiplication of ten plus less than 5.
pull/88/head
Lucia Velasco 6 years ago
parent 875f6d0f7a
commit caaba6d513

@ -112,6 +112,16 @@ T('toNearest', function () {
t('83105511539', '83105511539.5', new Decimal('-1'), 3, 5);
t('83105511540', '83105511539.5000000000000000000001', -1, 3, 5);
t('83105511540', '83105511539.4', 1, 30, 0);
t('83105511539', '83105511539.4', 1, 30, 1);
t('83105511540', '83105511539.4', 1, 30, 2);
t('83105511539', '83105511539.4', 1, 30, 3);
t('83105511539', '83105511539.4', 1, 30, 4);
t('83105511539', '83105511539.4', 1, 30, 5);
t('83105511539', '83105511539.4', 1, 30, 6);
t('83105511539', '83105511539.4', 1, 30, 7);
t('83105511539', '83105511539.4', 1, 30, 8);
t('83105511540', '83105511539.5', 1, 30, 0);
t('83105511539', '83105511539.5', 1, 30, 1);
t('83105511540', '83105511539.5', 1, 30, 2);

Loading…
Cancel
Save