You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
253 B

var pi = Math.PI,
halfPi = pi / 2;
export function sinIn(t) {
return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
}
export function sinOut(t) {
return Math.sin(t * halfPi);
}
export function sinInOut(t) {
return (1 - Math.cos(pi * t)) / 2;
}