From 97faa20056d541cd495be453f3d4e5045682b46f Mon Sep 17 00:00:00 2001 From: Anthony Lawn Date: Mon, 12 Dec 2022 14:18:08 -0600 Subject: [PATCH] Fix addSoftcap not affecting currentAt or nextAt --- src/features/conversion.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/features/conversion.ts b/src/features/conversion.ts index d2a47d0..e2f7584 100644 --- a/src/features/conversion.ts +++ b/src/features/conversion.ts @@ -507,6 +507,8 @@ export function addSoftcap( ): ScalingFunction { return { ...scaling, + currentAt: conversion => softcap(scaling.currentAt(conversion), unref(cap), Decimal.recip(unref(power))), + nextAt: conversion => softcap(scaling.nextAt(conversion), unref(cap), Decimal.recip(unref(power))), currentGain: conversion => softcap(scaling.currentGain(conversion), unref(cap), unref(power)) };