-
Notifications
You must be signed in to change notification settings - Fork 5
Valuator
doyousketch2 edited this page Sep 13, 2019
·
5 revisions
Corresponds to:
Fl_Valuator
Functions
obj:bounds( int min, int max )-
obj:clamp( int val ) ==> int newValclamps value to range
-
obj:format() ==> str valif step value zero then %g format
else %.*f format w/ digits for step value -
obj:increment( int value, int n ) ==> int newValadds (n times step) to value
if step 0, use (max - min) / 100 -
obj:range( int min, int max )clamping is done after rounding to step value
-
obj:round( int val ) ==> int newValRound to nearest step increment
Does nothing if step is zero
Properties
-
obj.step ==> int valgetobj.step = int valset -
obj.value ==> int valgetobj.value ==> int valset -
obj.maximum ==> int maxgetobj.maximum = int maxset -
obj.minimum ==> int mingetobj.minimum = int minset -
obj.precision = int digitssetSets step to 1.0 / 10 digits