Fix error in test

Also misc changes
This commit is contained in:
Aaron Smith 2023-10-27 15:47:43 +01:00
parent aca08709b6
commit 7d82fe353e
4 changed files with 34 additions and 36 deletions

View file

@ -161,7 +161,8 @@ local function spring<T>(source: () -> T, period: number?, damping_ratio: number
local c_c = 2*w_n
local c = z * c_c
-- todo: is there a solution to this other than upping step frequency?
-- todo: is there a solution other than reducing step size?
-- todo: this does not catch all solver exploding cases
if c > UPDATE_RATE*2 then -- solver will explode if this is true
throw("spring damping too high, consider reducing damping or increasing period")
end