(i)
| 3780 | }; |
| 3781 | |
| 3782 | function clampCssByte(i) { // Clamp to integer 0 .. 255. |
| 3783 | i = Math.round(i); // Seems to be what Chrome does (vs truncation). |
| 3784 | return i < 0 ? 0 : i > 255 ? 255 : i; |
| 3785 | } |
| 3786 | |
| 3787 | function clampCssFloat(f) { // Clamp to float 0.0 .. 1.0. |
| 3788 | return f < 0 ? 0 : f > 1 ? 1 : f; |
no test coverage detected