From 54eba578812719b6aef0cb8ba6dace560c596e54 Mon Sep 17 00:00:00 2001 From: hkrish Date: Sun, 12 May 2013 23:46:03 +0200 Subject: [PATCH] Minor fixes in the tests --- fatline/intersectTests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fatline/intersectTests.js b/fatline/intersectTests.js index 52de72c3..916af009 100644 --- a/fatline/intersectTests.js +++ b/fatline/intersectTests.js @@ -4,11 +4,11 @@ paper.install(window); /** * http://stackoverflow.com/questions/6875625/does-javascript-provide-a-high-resolution-timer */ -if (window.performance.now) { +if (window.performance && window.performance.now) { console.log("Using high performance timer"); getTimestamp = function() { return window.performance.now(); }; } else { - if (window.performance.webkitNow) { + if (window.performance && window.performance.webkitNow) { console.log("Using webkit high performance timer"); getTimestamp = function() { return window.performance.webkitNow(); }; } else { @@ -307,7 +307,7 @@ function runTests() { txt.fillColor = '#000'; txt.content = 'fatline vs subdiv'; new Path.Rectangle( [600, 90], [20, 100] ).style = { fillColor: '#ccc', strokeColor: '#000' }; - ny = 90 + (avgSpeedup - minSpeedup) * 100.0 / (maxSpeedup - minSpeedup); + ny = 190 - (avgSpeedup - minSpeedup) * 100.0 / (maxSpeedup - minSpeedup); new Path.Line( [600, ny], [620, ny] ).style = { strokeWidth: 2, strokeColor: '#000' }; txt = new PointText([630, 95]); txt.fillColor = '#000';