Use correct denominator in randIntWithout test

This commit is contained in:
Joke Book 2020-05-07 16:28:50 +01:00
parent 57445a4d49
commit e5cc0e302d

View file

@ -58,10 +58,10 @@ test('inclusiveRandIntWithout', t => {
return result; return result;
}; };
t.strictEqual(withRandomValue(3 / 5, 0, 6, 2), 4); t.strictEqual(withRandomValue(3 / 6, 0, 6, 2), 4);
t.strictEqual(withRandomValue(2 / 5, 0, 6, 2), 3); t.strictEqual(withRandomValue(2 / 6, 0, 6, 2), 3);
t.strictEqual(withRandomValue(1 / 5, 0, 6, 2), 1); t.strictEqual(withRandomValue(1 / 6, 0, 6, 2), 1);
t.strictEqual(withRandomValue(1.9 / 5, 0, 6, 2), 1); t.strictEqual(withRandomValue(1.9 / 6, 0, 6, 2), 1);
t.strictEqual(withRandomValue(3 / 4, 10, 14, 10), 13); t.strictEqual(withRandomValue(3 / 4, 10, 14, 10), 13);
t.strictEqual(withRandomValue(0 / 4, 10, 14, 10), 11); t.strictEqual(withRandomValue(0 / 4, 10, 14, 10), 11);