|
Last change
on this file since a762898 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
253 bytes
|
| Rev | Line | |
|---|
| [e4c61dd] | 1 | var pi = Math.PI,
|
|---|
| 2 | halfPi = pi / 2;
|
|---|
| 3 |
|
|---|
| 4 | export function sinIn(t) {
|
|---|
| 5 | return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
|
|---|
| 6 | }
|
|---|
| 7 |
|
|---|
| 8 | export function sinOut(t) {
|
|---|
| 9 | return Math.sin(t * halfPi);
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | export function sinInOut(t) {
|
|---|
| 13 | return (1 - Math.cos(pi * t)) / 2;
|
|---|
| 14 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.