I will write Coffeescript but the javacript generated should e evident I want to run a function on many variables and I want to keep the result on them, as they are properties of the object that are read somewhere else. As it seems that Javascript will put them as value and not reference, I have only found this ugly way to implement what I want:
[@au, @iu, @rdis, @rtres, @rmin, @rmax, @dmil, @dal, @dacc] =
[@au, @iu, @rdis, @rtres, @rmin, @rmax, @dmil, @dal, @dacc].map (x) -> x * (0.95 + Math.random()*0.1)
There is no better way of doing this?