expoOut glitch
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 386
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
The expoOut function is meant to serve as an ease to gradually go from 0 to 1. I noted a glitch. When going from 0.0 to 1.0 in steps of 0.01, the last few values are as follows:
input: output:
```
0.96 0.9987114180558858
0.97 0.9987977105338428
0.98 0.9988782242626982
0.99 0.9989533462279919
1 1
```
```
Diff from 0.98 to 0.99: 0.00007512196529368964
Diff from 0.99 to 1.00: 0.001046653772008077
```
As you can see, the diff 0.99 to 1.00 is substantually bigger than the diff from 0.98 to 0.99. In animations, this causes excactly what you try to prevent!
Looking at the code:
```
function expoOut(t) {
return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t)
}
```
Returning 1.0 when t === 1.0 is WRONG in my opinion.
Agree?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the expoOut function shown in the issue and reproduce its values for inputs from 0.96 through 1.00 in 0.01 steps. Compare the final increments against the intended easing behavior; done means the end of the range no longer introduces the reported jump while still reaching 1.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100