mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Use correct denominator in randIntWithout test
This commit is contained in:
parent
57445a4d49
commit
e5cc0e302d
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue