Skip to content

Commit ae52749

Browse files
aomarkssamthor
authored andcommitted
Minor fixes for Closure compilation compatibility. (#200)
1 parent 3f9af6b commit ae52749

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/shadow-handler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
shadow.inset = true;
2727
return result;
2828
}
29-
var result = scope.consumeLengthOrPercent(string);
29+
result = scope.consumeLengthOrPercent(string);
3030
if (result) {
3131
shadow.lengths.push(result[0]);
3232
return result;
3333
}
34-
var result = scope.consumeColor(string);
34+
result = scope.consumeColor(string);
3535
if (result) {
3636
shadow.color = result[0];
3737
return result;

src/timing-utilities.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
},
8282
set iterationStart(value) {
8383
if ((isNaN(value) || value < 0) && isInvalidTimingDeprecated()) {
84-
throw new TypeError('iterationStart must be a non-negative number, received: ' + timing.iterationStart);
84+
throw new TypeError('iterationStart must be a non-negative number, received: ' + value);
8585
}
8686
this._setMember('iterationStart', value);
8787
},
@@ -192,9 +192,9 @@
192192
}
193193

194194
var start = 0, end = 1;
195+
function f(a, b, m) { return 3 * a * (1 - m) * (1 - m) * m + 3 * b * (1 - m) * m * m + m * m * m};
195196
while (start < end) {
196197
var mid = (start + end) / 2;
197-
function f(a, b, m) { return 3 * a * (1 - m) * (1 - m) * m + 3 * b * (1 - m) * m * m + m * m * m};
198198
var xEst = f(a, c, mid);
199199
if (Math.abs(x - xEst) < 0.00001) {
200200
return f(b, d, mid);

0 commit comments

Comments
 (0)