fix: lerp target in ParamChange::MLinAlg
This commit is contained in:
parent
585fdc3a7e
commit
c618d22f0b
@ -66,9 +66,9 @@ namespace ParamChange {
|
|||||||
float visc, float nostal, float peerp, int curr, int max) {
|
float visc, float nostal, float peerp, int curr, int max) {
|
||||||
float pct_done = (float)curr / (float)max;
|
float pct_done = (float)curr / (float)max;
|
||||||
return {
|
return {
|
||||||
visc - (0.9f - 0.4f) * pct_done,
|
visc - (visc - 0.4f) * pct_done,
|
||||||
nostal - (2.5f - 0.5f) * pct_done,
|
nostal - (nostal - 0.5f) * pct_done,
|
||||||
peerp + (2.5f - 0.5f) * pct_done,
|
peerp - (peerp - 2.5f) * pct_done,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -80,9 +80,9 @@ namespace ParamChange {
|
|||||||
float pct_done = (float)curr / (float)max;
|
float pct_done = (float)curr / (float)max;
|
||||||
float scale_factor = (std::tanh(steepness * (pct_done - 0.5)) + 1) / 2;
|
float scale_factor = (std::tanh(steepness * (pct_done - 0.5)) + 1) / 2;
|
||||||
return {
|
return {
|
||||||
visc - (0.9f - 0.4f) * scale_factor,
|
visc - (visc - 0.4f) * scale_factor,
|
||||||
nostal - (2.5f - 0.5f) * scale_factor,
|
nostal - (nostal - 0.5f) * scale_factor,
|
||||||
peerp + (2.5f - 0.5f) * scale_factor,
|
peerp - (peerp - 2.5f) * scale_factor,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user