Improved linearRand: support precision and integers (#230)