From 4797f46ab6bb0e66b5ea9727702539a807632c04 Mon Sep 17 00:00:00 2001 From: Speykious Date: Mon, 19 Feb 2024 01:12:25 +0100 Subject: [PATCH] Physics oversight --- inox2d/src/physics/runge_kutta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inox2d/src/physics/runge_kutta.rs b/inox2d/src/physics/runge_kutta.rs index 3d23186..7e982bc 100644 --- a/inox2d/src/physics/runge_kutta.rs +++ b/inox2d/src/physics/runge_kutta.rs @@ -56,7 +56,7 @@ pub fn tick, P>( vars[i] = curs[i] + h * (k1s[i] + 2. * k2s[i] + 2. * k3s[i] + k4s[i]) / 6.; if !vars[i].is_finite() { // Simulation failed, revert - phys.vars.set_f32s(curs); + vars = curs; break; } }