source:
node_modules/d3-ease/src/exp.js@
e4c61dd
| Last change on this file since e4c61dd was e4c61dd, checked in by , 6 months ago | |
|---|---|
|
|
| File size: 233 bytes | |
| Line | |
|---|---|
| 1 | import {tpmt} from "./math.js"; |
| 2 | |
| 3 | export function expIn(t) { |
| 4 | return tpmt(1 - +t); |
| 5 | } |
| 6 | |
| 7 | export function expOut(t) { |
| 8 | return 1 - tpmt(t); |
| 9 | } |
| 10 | |
| 11 | export function expInOut(t) { |
| 12 | return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2; |
| 13 | } |
Note:
See TracBrowser
for help on using the repository browser.
