Merge pull request #1 from jpatokal/jpatokal-patch-1
Fix off-by-1 error for computing step sizes (#184)
This commit is contained in:
commit
6f65ed596f
@ -194,7 +194,8 @@
|
|||||||
opt = opt || {};
|
opt = opt || {};
|
||||||
if (this.options.steps !== steps) {
|
if (this.options.steps !== steps) {
|
||||||
this.options.steps = steps;
|
this.options.steps = steps;
|
||||||
this.options.step = (this.options.end - this.options.start)/this.getSteps();
|
// If you have N frames, there are N-1 steps between them
|
||||||
|
this.options.step = (this.options.end - this.options.start) / (this.getSteps() - 1);
|
||||||
this.options.step = this.options.step || 1;
|
this.options.step = this.options.step || 1;
|
||||||
if (!opt.silent) this.reload();
|
if (!opt.silent) this.reload();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user