1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 01:47:59 +01:00

Add util.Math.constrain.

This commit is contained in:
Doug Kearns
2009-05-30 20:29:23 +10:00
parent 3e984c776d
commit 95dffaf95a
5 changed files with 27 additions and 14 deletions

View File

@@ -831,7 +831,7 @@ function History() //{{{
liberator.beep();
else
{
let index = Math.max(start, Math.min(end, current + steps));
let index = util.Math.constrain(current + steps, start, end);
window.getWebNavigation().gotoIndex(index);
}
},