File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
slider/src/main/java/io/monstarlab/mosaic/slider/distribution Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,17 @@ import io.monstarlab.mosaic.slider.math.Point
5
5
import io.monstarlab.mosaic.slider.math.RangedLinearEquation
6
6
import io.monstarlab.mosaic.slider.math.valueToFraction
7
7
8
+ /* *
9
+ * Represents a distribution strategy for slider values based on a list of check points.
10
+ * Each check point is a pair of offset fraction and value that will be associated with with this progress
11
+ * The distribution will interpolate between the check points using linear equations.
12
+ *
13
+ * Example:
14
+ * For the value range of 0..100
15
+ * CheckPointsValueDistribution(listOf(0f to 0f, 0.5f to 80f, 1f to 100f))
16
+ * This will create a distribution that will place value of 80 at 0.5 progress allowing the user to
17
+ * have more precision while selecting values between 80 and 100
18
+ */
8
19
public class CheckPointsValueDistribution (
9
20
valuesMap : List <Pair <Float , Float >>,
10
21
) :
You can’t perform that action at this time.
0 commit comments