ajout exo tp5

This commit is contained in:
2026-03-09 14:55:40 +01:00
parent 1fe20f3f3b
commit 1c7d7f636a
9 changed files with 253 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
const valueToPoint = (value, index, total) => {
const x = 0
const y = -value * 1.6
const angle = Math.PI * 2 / total * index
const cos = Math.cos(angle)
const sin = Math.sin(angle)
const tx = x * cos - y * sin + 200
const ty = x * sin + y * cos + 200
return {
x: tx,
y: ty
}
}