From 0d4bdb2dbce4adfc648324b7b3b1c6e0db6521a9 Mon Sep 17 00:00:00 2001 From: dvdrw Date: Tue, 3 Dec 2024 14:56:26 +0100 Subject: [PATCH] fix: lerp target in ParamChange::MLinAlg --- include/swarm.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/swarm.hpp b/include/swarm.hpp index d6000b1..93b808a 100644 --- a/include/swarm.hpp +++ b/include/swarm.hpp @@ -66,9 +66,9 @@ namespace ParamChange { float visc, float nostal, float peerp, int curr, int max) { float pct_done = (float)curr / (float)max; return { - visc - (0.9f - 0.4f) * pct_done, - nostal - (2.5f - 0.5f) * pct_done, - peerp + (2.5f - 0.5f) * pct_done, + visc - (visc - 0.4f) * pct_done, + nostal - (nostal - 0.5f) * pct_done, + peerp + (peerp - 0.5f) * pct_done, }; } }; @@ -80,9 +80,9 @@ namespace ParamChange { float pct_done = (float)curr / (float)max; float scale_factor = (std::tanh(steepness * (pct_done - 0.5)) + 1) / 2; return { - visc - (0.9f - 0.4f) * scale_factor, - nostal - (2.5f - 0.5f) * scale_factor, - peerp + (2.5f - 0.5f) * scale_factor, + visc - (visc - 0.4f) * scale_factor, + nostal - (nostal - 0.5f) * scale_factor, + peerp + (peerp - 0.5f) * scale_factor, }; } };