Skip to content

Commit

Permalink
Fixed issue with slider where the increment doesn't properly handle a…
Browse files Browse the repository at this point in the history
… min that can't be divided by it
  • Loading branch information
nightcycle committed Jul 31, 2024
1 parent a4671f7 commit 5bb7145
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ types
lints
tests
Synthetic.rbxl
.env
.env
synthetic.rbxl.lock
2 changes: 1 addition & 1 deletion src/Component/Slider/ColdFusion.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions synthetic.rbxl.lock

This file was deleted.

0 comments on commit 5bb7145

Please sign in to comment.