-
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 newVal
clamps value to range
-
obj:format() ==> str val
if step value zero then %g format
else %.*f format w/ digits for step value -
obj:increment( int value, int n ) ==> int newVal
adds (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 newVal
Round to nearest step increment
Does nothing if step is zero
Properties
-
obj.step ==> int val
getobj.step = int val
set -
obj.value ==> int val
getobj.value ==> int val
set -
obj.maximum ==> int max
getobj.maximum = int max
set -
obj.minimum ==> int min
getobj.minimum = int min
set -
obj.precision = int digits
setSets step to 1.0 / 10 digits