init: tool for graphing functions and slope fields in love2d

This commit is contained in:
Devyn Freet
2026-10-11 23:03:35 -04:00
parent 0bae59383e
commit db61937809
4 changed files with 243 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
local function factorial(n)
if n <= 2 then
return n
end
return n * factorial(n-1)
end
local function calculate_e(terms)
local e = 1
for i = 1, terms do
e = e + 1 / factorial(i)
end
return e
end
return calculate_e(10)