okay now i fucked it up differently
This commit is contained in:
parent
a1df463a16
commit
a4ed50d9e2
@ -180,8 +180,8 @@ function brake_dist(v0, brake_max)
|
||||
local tri_frames = abs(v0/brake_max)&-1
|
||||
local chunks = tri_frames * (tri_frames - 1) >> 1
|
||||
local chunk_zone = chunks * brake_max
|
||||
local overage = v0 - chunk_zone
|
||||
return chunk_zone + overage * (tri_frames + 1) * -sgn(v0), (overage > 0) and tri_frames + 1 or tri_frames
|
||||
local overage = v0 - tri_frames * brake_max
|
||||
return (chunk_zone + overage * (tri_frames + 1)) * -sgn(v0), (overage > 0) and tri_frames + 1 or tri_frames
|
||||
end
|
||||
|
||||
function constraints:cycle()
|
||||
|
Loading…
Reference in New Issue
Block a user