mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Ensure bench/random test uses int dimensions
This commit is contained in:
parent
c158d51f8b
commit
35c53f78c8
@ -12,7 +12,7 @@
|
|||||||
"imagemagick-native": "^1.6.0",
|
"imagemagick-native": "^1.6.0",
|
||||||
"gm": "^1.17.0",
|
"gm": "^1.17.0",
|
||||||
"async": "^0.9.0",
|
"async": "^0.9.0",
|
||||||
"semver": "^4.1.0",
|
"semver": "^4.2.0",
|
||||||
"benchmark": "^1.0.0"
|
"benchmark": "^1.0.0"
|
||||||
},
|
},
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
|
@ -12,7 +12,7 @@ var min = 320;
|
|||||||
var max = 960;
|
var max = 960;
|
||||||
|
|
||||||
var randomDimension = function() {
|
var randomDimension = function() {
|
||||||
return Math.random() * (max - min) + min;
|
return Math.ceil(Math.random() * (max - min) + min);
|
||||||
};
|
};
|
||||||
|
|
||||||
new Benchmark.Suite('random').add('imagemagick', {
|
new Benchmark.Suite('random').add('imagemagick', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user