reorganize directory and file structure

This commit is contained in:
Joeri Exelmans 2025-05-07 13:44:49 +02:00
parent 1d826ea8d4
commit 48390b8556
99 changed files with 1155 additions and 1629 deletions

23
extra/point/nominal.js Normal file
View file

@ -0,0 +1,23 @@
export const cart2polar = ({x, y}) => {
const r = Math.sqrt(x*x + y*y);
const θ = Math.atan(y/x);
return {r, θ};
};
export const polar2cart = ({r, θ}) => {
const x = r * Math.cos(θ);
const y = r * Math.sin(θ);
return {x, y};
}
export const translate = dx => dy => ({x, y}) => {
return {left: x+dx, right: y+dy};
}
export const rotate = => ({r, θ}) => {
return {r, θ: θ+};
}
export const scale = dr => ({r, θ}) => {
return {r: r+dr, θ};
}