Skip to content

Commit 505bd52

Browse files
committed
Fix UnitBezier to correctly refer to class static data.
1 parent 9af3bcd commit 505bd52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MotionMark/resources/extensions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,10 @@ class UnitBezier {
419419

420420
for (t2 = x, i = 0; i < 8; ++i) {
421421
x2 = this.sampleX(t2) - x;
422-
if (Math.abs(x2) < this.epsilon)
422+
if (Math.abs(x2) < UnitBezier.epsilon)
423423
return t2;
424424
d2 = this.sampleDerivativeX(t2);
425-
if (Math.abs(d2) < this.derivativeEpsilon)
425+
if (Math.abs(d2) < UnitBezier.derivativeEpsilon)
426426
break;
427427
t2 = t2 - x2 / d2;
428428
}
@@ -438,7 +438,7 @@ class UnitBezier {
438438

439439
while (t0 < t1) {
440440
x2 = this.sampleX(t2);
441-
if (Math.abs(x2 - x) < this.epsilon)
441+
if (Math.abs(x2 - x) < UnitBezier.epsilon)
442442
return t2;
443443
if (x > x2)
444444
t0 = t2;

0 commit comments

Comments
 (0)