Support units of measure on randomRange, fix generating double code