Comments (5)
Yes, it is an incredibly small value and I'm sure an argument could be made about managing floating point precision but considering some of the other functions defer to 0
if x === 0
it stands to reason to have something similar here.
from easings.net.
= 1 + c3 * pow(x - 1, 3) + c1 * pow(x - 1, 2);
= 1 + 2.70158 * pow(0 - 1, 3) + 1.70158 * pow(0 - 1, 2); // x = 0
= 1 + 2.70158 * pow( - 1, 3) + 1.70158 * pow( - 1, 2);
= 1 + 2.70158 * (-1) + 1.70158 * 1; // we know -1^2 is 1 while -1^3 is -1 still
= 1 - 2.70158 + 1.70158 ;
= 0
Here is my work for arriving at 0 as output with a 0 input. Seems correct to me.
from easings.net.
from easings.net.
Ah I see, format your output to a certain number of decimal places seems like the proper solution.
from easings.net.
Changing c1
to 1.701575
works. Effect should be very minor.
from easings.net.
Related Issues (20)
- Add Hebrew translation HOT 8
- easeBack functions not working on Safari HOT 1
- Разное отображение изингов на русском и английском языках HOT 1
- Put linear ones for comparison. HOT 1
- What works well for zooming out? HOT 3
- Different cubic-bezier() presets in Chrome DevTools
- More permissive license for easing functions snippets?
- Translation in hindi language HOT 1
- mathematically rigid quadratic curve parameters for easeInQuad
- Exponential functions not accurate HOT 1
- Add more easing function from DOTween
- Missing Math in Typescript for easeOutCirc HOT 2
- Add easeOutIn functions
- cubic-bezier() values are not the original ones
- Add CSS variants of `easeInElastic` and `easeInBounce` with `linear()` HOT 1
- Add smoothstep
- Have a way to set the speed/duration
- Better easeInCirc and easeOutCirc formulas HOT 1
- Keyframe-based functions run backwards in preview
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easings.net.