speice.io/blog/2024-11-15-playing-with-fire/2-transforms/post.ts

11 lines
264 B
TypeScript
Raw Permalink Normal View History

2024-11-30 17:35:42 -05:00
// hidden-start
import { applyCoefs, Coefs, Transform } from "../src/transform";
2024-11-30 17:35:42 -05:00
// hidden-end
export const transformPost = (
transform: Transform,
coefs: Coefs
): Transform =>
(x, y) => {
[x, y] = transform(x, y);
return applyCoefs(x, y, coefs);
}