Skip to content

Commit 35a94e1

Browse files
Acissatharxen2
authored andcommitted
Re-add the minimum value when calculating nearest tick
Cherry-picked from stride3d#3109.
1 parent a6d995f commit 35a94e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sources/engine/Stride.UI/Controls/Slider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ protected float CalculateClosestTick(float rawValue)
313313
var absoluteValue = rawValue - Minimum;
314314
var step = (Maximum - Minimum) / TickFrequency;
315315
var times = MathF.Round(absoluteValue / step);
316-
return times * step;
316+
return times * step + Minimum;
317317
}
318318

319319
/// <summary>

0 commit comments

Comments
 (0)