@@ -564,8 +564,9 @@ get fields like (!html n~1•~!)(!tex pass:[$n_{1\bullet}$]!) because
564564the sums of rows or columns are not stored directly in our data
565565structure.
566566
567- Jacques kept his journal for three months. The resulting data set is
568- available in the coding sandbox for this chapter(!tex
567+ (((JOURNAL data set)))Jacques kept his journal for three months. The
568+ resulting ((data set)) is available in the coding sandbox for this
569+ chapter(!tex
569570(http://eloquentjavascript.net/code[_eloquentjavascript.net/code_])!),
570571where it is stored in the `JOURNAL` variable, and in a downloadable
571572http://eloquentjavascript.net/code/jacques_journal.js[file].
@@ -1016,10 +1017,10 @@ them into an array.
10161017== The Math object ==
10171018
10181019(((Math object)))(((Math.min function)))(((Math.max
1019- function)))(((Math.sqrt function)))(((min function )))(((max
1020- function )))(((sqrt function))) As we've seen, `Math` is a grab-bag of
1021- number-related utility functions, such as `Math.max` (maximum),
1022- `Math.min` (minimum), and `Math. sqrt` (square root).
1020+ function)))(((Math.sqrt function)))(((minimum )))(((maximum)))(((square
1021+ root )))As we've seen, `Math` is a grab-bag of number-related utility
1022+ functions, such as `Math.max` (maximum), `Math.min` (minimum), and
1023+ `Math.sqrt` (square root).
10231024
10241025[[namespace_pollution]]
10251026(((namespace)))(((namespace pollution)))(((Object type)))The
@@ -1043,12 +1044,11 @@ neither, so be careful.
10431044
10441045(((trigonometry)))(((Math.cos function)))(((Math.sin
10451046function)))(((Math.tan function)))(((Math.acos function)))(((Math.asin
1046- function)))(((Math.atan function)))(((Math.PI constant)))(((cos
1047- function)))(((sin function)))(((tan function)))(((acos
1048- function)))(((asin function)))(((atan function)))(((PI constant)))Back
1049- to the `Math` object. If you need to do trigonometry, `Math` can help.
1050- It contains `cos` (cosine), `sin` (sine), and `tan` (tangent), as well
1051- as their inverse functions, `acos`, `asin`, and `atan`. The number π
1047+ function)))(((Math.atan function)))(((Math.PI
1048+ constant)))(((cosine)))(((sine)))(((tangent)))(((PI constant)))Back to
1049+ the `Math` object. If you need to do trigonometry, `Math` can help. It
1050+ contains `cos` (cosine), `sin` (sine), and `tan` (tangent), as well as
1051+ their inverse functions, `acos`, `asin`, and `atan`. The number π
10521052(pi)—or at least the closest approximation that fits in a JavaScript
10531053number—is available as `Math.PI`. (There is an old programming
10541054tradition of writing the names of constant values in all caps.)
@@ -1070,7 +1070,7 @@ If sines and cosines are not something you are very familiar with,
10701070don't worry. When they are used in this book, in
10711071link:13_dom.html#sin_cos[Chapter 13], I'll explain them.
10721072
1073- (((Math.random function)))(((random function )))The previous example
1073+ (((Math.random function)))(((random numbers )))The previous example
10741074uses `Math.random`. This is a function that returns a new
10751075pseudo-random number between zero (inclusive) and one (exclusive)
10761076every time you call it.
@@ -1097,10 +1097,10 @@ internal state and returns part of the result of those computations.
10971097The machine also uses the outcome to change its own internal state so
10981098that the next "random" number produced will be different.
10991099
1100- (((rounding)))(((Math.floor function)))(((floor function))) If we want
1101- a whole random number instead of a fractional one, we can use
1102- `Math.floor` (which rounds down to the nearest whole number) on the
1103- result of `Math.random`.
1100+ (((rounding)))(((Math.floor function)))If we want a whole random
1101+ number instead of a fractional one, we can use `Math.floor` (which
1102+ rounds down to the nearest whole number) on the result of
1103+ `Math.random`.
11041104
11051105// test: no
11061106
@@ -1115,10 +1115,9 @@ equal to zero, and below ten. Since `Math.floor` rounds down, this
11151115expression will produce, with equal chance, any number from 0 through
111611169.
11171117
1118- (((Math.ceil function)))(((Math.round function)))(((ceil
1119- function)))(((round function))))There are also the functions
1120- `Math.ceil` (for "ceiling", which rounds up to a whole number) and
1121- `Math.round` (to the nearest whole number).
1118+ (((Math.ceil function)))(((Math.round function)))There are also the
1119+ functions `Math.ceil` (for "ceiling", which rounds up to a whole
1120+ number) and `Math.round` (to the nearest whole number).
11221121
11231122== The global object ==
11241123
0 commit comments