scratch/utils: added float/int conversion and related tests for ilim (just for r channel, still have to copy it over for g,b,a)