Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float smoothstep(float edge0, float edge1, float x)
- {
- // Scale, bias and saturate x to 0..1 range
- x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
- // Evaluate polynomial
- return x*x*(3 - 2 * x);
- }
- #include <math.h>
- #include <cmath>
- #include <algorithm>
- float linearIntepolate(float currentLocation, float Goal, float time){
- return (1 - time) * currentLocation + time * Goal;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement