[SR-Users] Float Comparison
Alex Hermann
alex at speakup.nl
Thu Aug 25 12:54:57 CEST 2011
On Thursday 25 August 2011, Daniel-Constantin Mierla wrote:
> as mentioned before, script variables work only with integer or string
> values. In this case I suggest you load the values as string and then
> use Lua to compute what you want as float. Alternative, load as string
> (n the format integer.decimals) and split the value using transformation
> in the part before the dot and the part after dot. Then you can do
> operations with them.
If you just use fixed-point for fractional values, you can remove the dot and
convert to int.
$(var(float){s.replace,.}{s.int})
--
Greetings,
Alex Hermann
More information about the sr-users
mailing list