Added new method to RandomUtils.