History of Math.random() Revision history for: English (US) Jun 8, 2015, 4:15:11 AM fscholz Revert to revision of 2015-05-05 16:01:20 by fscholz: "The spec (http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.random) says "Returns a Number value with positive sign, greater than or equal to 0 but less than 1" So, 0 is inclusive and 1 is Previous Jun 4, 2015, 5:20:11 AM alundiak Decided to change here, as far as I researched, and not received answer from MDN in twitter: https://twitter.com/landike/status/605118978718109696 Previous May 5, 2015, 4:01:20 PM fscholz clear tech review; thanks for catching the other edit so quickly Previous May 5, 2015, 3:15:39 PM jwa107 I believe someone changed it to Math.floor() in error, as Math.floor ensures uniform distribution. Math.round() is the one that does not. Previous May 5, 2015, 10:50:31 AM Acorath Code comment inconsistent with example. Using Math.round() could potentially yield a result higher than specified max value. Previous Feb 6, 2015, 3:10:37 AM Mingun Standardized markup, added `Reference` tag. Previous Jan 12, 2015, 3:06:03 AM Xophmeister Minor nitpick: The closed range format [x, y] means both x and y are included; as 1 is not included in the range of Math.random(), we use the half-open range format [x, y) Previous Jan 8, 2015, 8:29:37 PM The6P4C Previous Dec 29, 2014, 8:53:25 AM teoli Fixed mathematical notation for a right-opened interval. Previous Dec 29, 2014, 7:18:46 AM rustedwolf