Skip to content

Commit 48caa61

Browse files
authored
Fix LaTeX functions with underscore (#1330)
1 parent 3971dab commit 48caa61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

books/RayTracingTheRestOfYourLife.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@
10831083
For our purposes, if we have PDF $p()$ and cumulative distribution function $P()$, we can use this
10841084
"inverse function" with a random number to get what we want:
10851085

1086-
$$ f(d) = P^{-1} (\operatorname{random_double}()) $$
1086+
$$ f(d) = P^{-1} (\operatorname{random\_double}()) $$
10871087

10881088
For our PDF $p(r) = r/2$, and corresponding $P(r)$, we need to compute the inverse of $P(r)$. If we
10891089
have
@@ -1100,7 +1100,7 @@
11001100

11011101
Thus our random number generator with density $p(r)$ can be created with:
11021102

1103-
$$ f(d) = \sqrt{4\cdot\operatorname{random_double}()} $$
1103+
$$ f(d) = \sqrt{4 \cdot \operatorname{random\_double}()} $$
11041104

11051105
Note that this ranges from 0 to 2 as we hoped, and if we check our work, we replace
11061106
`random_double()` with $1/4$ to get 1, and also replace with $1/2$ to get $\sqrt{2}$, just as
@@ -2154,7 +2154,7 @@
21542154
cross product that $\mathbf{n} \times \mathbf{a}$ is perpendicular to both $\mathbf{n}$ and
21552155
$\mathbf{a}$:
21562156

2157-
$$ \mathbf{s} = \operatorname{unit_vector}(\mathbf{n} \times \mathbf{a}) $$
2157+
$$ \mathbf{s} = \operatorname{unit\_vector}(\mathbf{n} \times \mathbf{a}) $$
21582158

21592159
$$ \mathbf{t} = \mathbf{n} \times \mathbf{s} $$
21602160

0 commit comments

Comments
 (0)