source: node_modules/d3-ease/src/sin.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 253 bytes
Line 
1var pi = Math.PI,
2 halfPi = pi / 2;
3
4export function sinIn(t) {
5 return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
6}
7
8export function sinOut(t) {
9 return Math.sin(t * halfPi);
10}
11
12export function sinInOut(t) {
13 return (1 - Math.cos(pi * t)) / 2;
14}
Note: See TracBrowser for help on using the repository browser.