speice.io/blog/2024-11-15-playing-with-fire/src/pdj.ts

10 lines
312 B
TypeScript

// hidden-start
import { Variation } from './variation'
//hidden-end
export type PdjParams = {a: number, b: number, c: number, d: number};
export function pdj({a, b, c, d}: PdjParams): Variation {
return (x, y) => [
Math.sin(a * y) - Math.cos(b * x),
Math.sin(c * x) - Math.cos(d * y)
]
}