From 5bb7145b1f10d371db380d941d1d49986722fe65 Mon Sep 17 00:00:00 2001 From: Nightcycle <77173389+nightcycle@users.noreply.github.com> Date: Wed, 31 Jul 2024 05:53:01 -0600 Subject: [PATCH] Fixed issue with slider where the increment doesn't properly handle a min that can't be divided by it --- .gitignore | 3 ++- src/Component/Slider/ColdFusion.luau | 2 +- synthetic.rbxl.lock | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 synthetic.rbxl.lock diff --git a/.gitignore b/.gitignore index 747b6564..573005b9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ types lints tests Synthetic.rbxl -.env \ No newline at end of file +.env +synthetic.rbxl.lock diff --git a/src/Component/Slider/ColdFusion.luau b/src/Component/Slider/ColdFusion.luau index 8f793b5c..4aa6f18f 100644 --- a/src/Component/Slider/ColdFusion.luau +++ b/src/Component/Slider/ColdFusion.luau @@ -549,7 +549,7 @@ function Interface.new( function(initial: number, input: number?, min: number, max: number, inc: number?): number local rawVal = math.clamp(input or initial, min, max) if inc then - return math.round(rawVal / inc) * inc + return min + math.round(rawVal - min / inc) * inc else return rawVal end diff --git a/synthetic.rbxl.lock b/synthetic.rbxl.lock deleted file mode 100644 index 9008167c..00000000 --- a/synthetic.rbxl.lock +++ /dev/null @@ -1,5 +0,0 @@ -117448 -RobloxStudioBeta -DESKTOP-UIAPQFM -faf3918c-cd67-4e9b-95e8-76107b83bc31 -