Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 327 lines (297 sloc) 17.13 kb
3c00616 Michal Pokorný Squashed commit of the following:
MichalPokorny authored
1 <!DOCTYPE html>
cde9e9f John Resig Re-run the exercises through the updated cleaner.
jeresig authored
2 <html data-require="math math-format graphie graphie-helpers">
3 <head>
e9807ff John Resig Clean up the exercise files using the new cleaning utility.
jeresig authored
4 <meta charset="UTF-8">
113bddd Ben Alpert Update the title tags to match real display names
spicyj authored
5 <title>Multiplying and dividing complex numbers in polar form</title>
ac1415e Ben Alpert Use requirejs for module loading
spicyj authored
6 <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
3c00616 Michal Pokorný Squashed commit of the following:
MichalPokorny authored
7 </head>
8 <body>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <div class="exercise">
10 <div class="problems">
11 <div id="multiply-cplx">
e4d4cc2 Peter Collingridge Ensure answer requires moving point
petercollingridge authored
12 <div class="vars" data-ensure="ANSWER_RADIUS !== 1 || ANSWER_ANGLE !== 0">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
13 <var id="DENOMINATOR">24</var>
14 <var id="USE_EULER_FORM">randFromArray( [ true, false ] )</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
15
16 <div data-ensure="ANSWER_RADIUS > 1 && ANSWER_RADIUS <= 10">
17 <var id="A_RADIUS">randRange(1, 10)</var>
18 <var id="B_RADIUS">randRange(1, 10)</var>
19 <var id="ANSWER_RADIUS">A_RADIUS * B_RADIUS</var>
20 </div>
21
22 <var id="A_RADIUS_REP">"\\blue{" + A_RADIUS + "}"</var>
23 <var id="A_ANGLE_NUMERATOR">randRange(1, DENOMINATOR - 1 )</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
24 <var id="A_ANGLE">A_ANGLE_NUMERATOR * PI * 2 / DENOMINATOR</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
25 <var id="A_ANGLE_REP">"\\blue{" + piFraction(A_ANGLE, true) + "}"</var>
26 <var id="A_REP">"\\blue{" + polarForm(A_RADIUS, A_ANGLE, USE_EULER_FORM) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
27 <var id="A_REAL">cos( A_ANGLE ) * A_RADIUS</var>
28 <var id="A_IMAG">sin( A_ANGLE ) * A_RADIUS</var>
29
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
30 <var id="B_RADIUS_REP">"\\green{" + B_RADIUS + "}"</var>
31 <var id="B_ANGLE_NUMERATOR">randRange(1, DENOMINATOR - 1 )</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
32 <var id="B_ANGLE">B_ANGLE_NUMERATOR * PI * 2 / DENOMINATOR</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
33 <var id="B_ANGLE_REP">"\\green{" + piFraction(B_ANGLE, true) + "}"</var>
34 <var id="B_REP">"\\green{" + polarForm(B_RADIUS, B_ANGLE, USE_EULER_FORM) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
35 <var id="B_REAL">cos( B_ANGLE ) * B_RADIUS</var>
36 <var id="B_IMAG">sin( B_ANGLE ) * B_RADIUS</var>
37
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
38 <var id="ANSWER_RADIUS_REP">"\\orange{" + ANSWER_RADIUS + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
39 <var id="ANSWER_ANGLE_NUMERATOR">( A_ANGLE_NUMERATOR + B_ANGLE_NUMERATOR ) % DENOMINATOR</var>
40 <var id="ANSWER_ANGLE">ANSWER_ANGLE_NUMERATOR * PI * 2 / DENOMINATOR</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
41 <var id="ANSWER_ANGLE_REP">"\\orange{" + piFraction(ANSWER_ANGLE, true) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
42 <var id="ANSWER_REAL">cos( ANSWER_ANGLE ) * ANSWER_RADIUS</var>
43 <var id="ANSWER_IMAG">sin( ANSWER_ANGLE ) * ANSWER_RADIUS</var>
44
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
45 <var id="INTERMEDIATE_ANGLE_REP">"\\orange{" + piFraction((A_ANGLE_NUMERATOR + B_ANGLE_NUMERATOR) * PI * 2 / DENOMINATOR, true) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
46 </div>
47 <p class="question">
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
48 Multiply the following complex numbers:
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
49 </p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
50 <p><code>\left(<var>A_REP</var>\right) \cdot \left(<var>B_REP</var>\right)</code></p>
51 <p><em>
52 The first number is plotted in <strong class="hint_blue">blue</strong>
53 and the second number is plotted in <strong class="hint_green">green</strong>.
54 Your current answer will be plotted in <strong class="hint_orange">orange</strong>.
55 </em></p>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
56 <p class="render-answer-area-here"></p>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
57
58 <!-- TODO: use the dots in hints? -->
59 <div class="graphie">
60 graphInit({
61 range: [ [ -10, 10 ], [ -10 ,10 ] ],
62 scale: 20,
63 tickStep: 1,
e9807ff John Resig Clean up the exercise files using the new cleaning utility.
jeresig authored
64 axisArrows: "&lt;-&gt;"
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
65 });
66
67 drawComplexChart( 10, DENOMINATOR );
68
69 circle( [A_REAL, A_IMAG], 1 / 4, {
70 fill: KhanUtil.BLUE,
71 stroke: "none"
72 });
73
74 circle( [B_REAL, B_IMAG], 1 / 4, {
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
75 fill: KhanUtil.GREEN,
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
76 stroke: "none"
77 });
78
79 graph.currComplexPolar = new ComplexPolarForm( DENOMINATOR, 10, USE_EULER_FORM );
ae6558c Emily Eisenberg Make answer types much more modular, and more internally consistent
xymostech authored
80
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
81 redrawComplexPolarForm();
5b7819b Ben Alpert Back out new answer-types.js for now
spicyj authored
82 </div>
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
83 <div class="solution" data-type="custom">
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
84 <div class="instruction" style="width: 180px;">
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
85 <div>
86 <div style="float: left;">Radius: <span id="current-radius"><code>1</code></span></div>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
87 <div style="float: right; margin-bottom: 4px;">
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
88 <input class="simple-button mini-button" onclick="updateComplexPolarForm(0, -1)" type="button" value="-">
89 <input class="simple-button mini-button" onclick="updateComplexPolarForm(0, 1)" type="button" value="+">
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
90 </div>
91 </div>
92 <div style="clear: both;">
93 <div style="float: left;">Angle: <span id="current-angle"><code>0</code></span></div>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
94 <div style="float: right; margin-bottom: 14px;">
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
95 <input class="simple-button mini-button" onclick="updateComplexPolarForm(-1, 0)" type="button" value="-">
96 <input class="simple-button mini-button" onclick="updateComplexPolarForm(1, 0)" type="button" value="+">
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
97 </div>
98 </div>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
99 <div id="number-label" style="background: #eee; padding: 5px; text-align: center;">1</div>
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
100 </div>
101 <div class="guess">[
102 graph.currComplexPolar.getAngleNumerator(),
103 graph.currComplexPolar.getRadius()
104 ]</div>
105 <div class="validator-function">
106 var angle = guess[0];
107 var radius = guess[1];
108
109 if (angle === 0 &amp;&amp; radius === 1) {
110 return "";
111 }
112
113 return angle === ANSWER_ANGLE_NUMERATOR &amp;&amp;
114 radius === ANSWER_RADIUS;
115 </div>
116 <div class="show-guess">
117 redrawComplexPolarForm(guess[0], guess[1]);
118 </div>
119 <div class="show-guess-solutionarea">
120 redrawComplexPolarForm(guess[0], guess[1]);
121 </div>
122 </div>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
123
124 <div class="hints">
125 <p>
126 Multiplying complex numbers in polar forms can be done by multiplying the lengths
127 and adding the angles.
128 </p>
129 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
130 The first number, <code><var>A_REP</var></code>,
131 has angle <code><var>A_ANGLE_REP</var></code>
132 and radius <code><var>A_RADIUS_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
133 </p>
134 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
135 The second number, <code><var>B_REP</var></code>,
136 has angle <code><var>B_ANGLE_REP</var></code>
137 and radius <code><var>B_RADIUS_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
138 </p>
139 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
140 The radius of the result will be
141 <code><var>A_RADIUS_REP</var> \cdot <var>B_RADIUS_REP</var> = <var>ANSWER_RADIUS_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
142 </p>
2e12f20 John Resig Run clean-exercises on the HTML exercises, fixing the entities inside th...
jeresig authored
143 <div data-if="A_ANGLE_NUMERATOR + B_ANGLE_NUMERATOR > 12 * 2" data-unwrap="">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
144 <p>
145 The sum of the angles is <code><var>A_ANGLE_REP</var> + <var>B_ANGLE_REP</var> = <var>INTERMEDIATE_ANGLE_REP</var></code>.
146 </p>
147 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
148 The angle <code><var>INTERMEDIATE_ANGLE_REP</var></code> is more than <code>2 \pi</code>.
149 A complex number goes a full circle if its angle is increased by <code>2 \pi</code>, so it goes back to itself.
150 Because of that, angles of complex numbers are convenient to keep between <code>0</code> and <code>2 \pi</code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
151 </p>
152 <p>
153 <code><var>INTERMEDIATE_ANGLE_REP</var> - 2 \pi = <var>ANSWER_ANGLE_REP</var></code>
154 <!-- The A and B angles are both between 0 and 2pi, so the maximum angle here is 4pi, so it's safe not to handle further 2pi multiples. -->
155 </p>
156 </div>
e9807ff John Resig Clean up the exercise files using the new cleaning utility.
jeresig authored
157 <p data-else="">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
158 The angle of the result is <code><var>A_ANGLE_REP</var> + <var>B_ANGLE_REP</var> = <var>ANSWER_ANGLE_REP</var></code>.
159 </p>
160 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
161 The radius of the result is <code><var>ANSWER_RADIUS_REP</var></code>
162 and the angle of the result is <code><var>ANSWER_ANGLE_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
163 </p>
164 </div>
165 </div>
166
167 <div id="divide-cplx">
e4d4cc2 Peter Collingridge Ensure answer requires moving point
petercollingridge authored
168 <div class="vars" data-ensure="ANSWER_RADIUS !== 1 || ANSWER_ANGLE !== 0">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
169 <var id="DENOMINATOR">24</var>
170 <var id="USE_EULER_FORM">randFromArray( [ true, false ] )</var>
171
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
172 <div data-ensure="A_RADIUS > 1 && A_RADIUS <= 10">
173 <var id="ANSWER_RADIUS">randRange(1, 10)</var>
174 <var id="B_RADIUS">randRange(1, 10)</var>
5a51a39 Peter Collingridge Fix variable in data-ensure
petercollingridge authored
175 <var id="A_RADIUS">ANSWER_RADIUS * B_RADIUS</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
176 </div>
177
178 <var id="ANSWER_RADIUS_REP">"\\orange{" + ANSWER_RADIUS + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
179 <var id="ANSWER_ANGLE_NUMERATOR">randRange( 0, DENOMINATOR - 1 )</var>
180 <var id="ANSWER_ANGLE">ANSWER_ANGLE_NUMERATOR * PI * 2 / DENOMINATOR</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
181 <var id="ANSWER_ANGLE_REP">"\\orange{" + piFraction(ANSWER_ANGLE, true) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
182
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
183 <var id="B_RADIUS_REP">"\\green{" + B_RADIUS + "}"</var>
184 <var id="B_ANGLE_NUMERATOR">randRange(1, DENOMINATOR - 1)</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
185 <var id="B_ANGLE">B_ANGLE_NUMERATOR * PI * 2 / DENOMINATOR</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
186 <var id="B_ANGLE_REP">"\\green{" + piFraction(B_ANGLE) + "}"</var>
187 <var id="B_REP">"\\green{" + polarForm(B_RADIUS, B_ANGLE, USE_EULER_FORM) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
188 <var id="B_REAL">cos( B_ANGLE ) * B_RADIUS</var>
189 <var id="B_IMAG">sin( B_ANGLE ) * B_RADIUS</var>
190
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
191 <var id="A_RADIUS_REP">"\\blue{" + A_RADIUS + "}"</var>
192 <var id="A_ANGLE_NUMERATOR">(ANSWER_ANGLE_NUMERATOR + B_ANGLE_NUMERATOR) % DENOMINATOR</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
193 <var id="A_ANGLE">A_ANGLE_NUMERATOR * PI * 2 / DENOMINATOR</var>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
194 <var id="A_ANGLE_REP">"\\blue{" + piFraction(A_ANGLE, true) + "}"</var>
195 <var id="A_REP">"\\blue{" + polarForm(A_RADIUS, A_ANGLE, USE_EULER_FORM) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
196 <var id="A_REAL">cos( A_ANGLE ) * A_RADIUS</var>
197 <var id="A_IMAG">sin( A_ANGLE ) * A_RADIUS</var>
198
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
199 <var id="INTERMEDIATE_ANGLE_REP">"\\orange{" + piFraction((A_ANGLE_NUMERATOR - B_ANGLE_NUMERATOR ) * PI * 2 / DENOMINATOR, true) + "}"</var>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
200 </div>
201 <p class="question">
202 Divide the following complex numbers:
203 </p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
204 <p data-if="USE_EULER_FORM">
205 <code>\Large{\dfrac{<var>A_REP</var>}{<var>B_REP</var>}}</code>
206 </p><p data-else="">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
207 <code>\dfrac{<var>A_REP</var>}{<var>B_REP</var>}</code>
208 </p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
209 <p><em>
210 The dividend is plotted in <strong class="hint_blue">blue</strong>
211 and the divisor is plotted in <strong class="hint_green">green</strong>.
212 Your current answer will be plotted in <strong class="hint_orange">orange</strong>.
213 </em></p>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
214 <p class="render-answer-area-here"></p>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
215
216 <div class="graphie">
217 graphInit({
218 range: [ [ -10, 10 ], [ -10, 10 ] ],
219 scale: 20,
220 tickStep: 1,
e9807ff John Resig Clean up the exercise files using the new cleaning utility.
jeresig authored
221 axisArrows: "&lt;-&gt;"
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
222 });
223
224 drawComplexChart( 10, DENOMINATOR );
225
226 circle( [A_REAL, A_IMAG], 1 / 4, {
227 fill: KhanUtil.BLUE,
228 stroke: "none"
229 });
230
231 circle( [B_REAL, B_IMAG], 1 / 4, {
232 fill: KhanUtil.GREEN,
233 stroke: "none"
234 });
235
236 graph.currComplexPolar = new ComplexPolarForm( DENOMINATOR, 10, USE_EULER_FORM );
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
237
238 redrawComplexPolarForm();
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
239 </div>
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
240 <div class="solution" data-type="custom">
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
241 <div class="instruction" style="width: 180px;">
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
242 <div>
243 <div style="float: left;">Radius: <span id="current-radius"><code>1</code></span></div>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
244 <div style="float: right; margin-bottom: 4px;">
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
245 <input class="simple-button mini-button" onclick="updateComplexPolarForm(0, -1)" type="button" value="-">
246 <input class="simple-button mini-button" onclick="updateComplexPolarForm(0, 1)" type="button" value="+">
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
247 </div>
248 </div>
249 <div style="clear: both;">
250 <div style="float: left;">Angle: <span id="current-angle"><code>0</code></span></div>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
251 <div style="float: right; margin-bottom: 14px;">
0f0c630 Michael Chang Clean up the exercise files using the new cleaning utility. (II)
cbhl authored
252 <input class="simple-button mini-button" onclick="updateComplexPolarForm(-1, 0)" type="button" value="-">
253 <input class="simple-button mini-button" onclick="updateComplexPolarForm(1, 0)" type="button" value="+">
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
254 </div>
255 </div>
29be961 Alex Lopatin Rearrange answer area content within some exercises
alopatin authored
256 <div id="number-label" style="background: #eee; padding: 5px; text-align: center;">1</div>
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
257 </div>
258 <div class="guess">[
259 graph.currComplexPolar.getAngleNumerator(),
260 graph.currComplexPolar.getRadius()
261 ]</div>
262 <div class="validator-function">
263 var angle = guess[0];
264 var radius = guess[1];
265
266 if (angle === 0 &amp;&amp; radius === 1) {
267 return "";
268 }
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
269
9de7cb7 Ben Eater Fix a bunch of things
beneater authored
270 return angle === ANSWER_ANGLE_NUMERATOR &amp;&amp;
271 radius === ANSWER_RADIUS;
272 </div>
273 <div class="show-guess">
274 redrawComplexPolarForm(guess[0], guess[1]);
275 </div>
276 <div class="show-guess-solutionarea">
277 redrawComplexPolarForm(guess[0], guess[1]);
278 </div>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
279 </div>
280
281 <div class="hints">
282 <p>
283 Dividing complex numbers in polar forms can be done by dividing the radii
284 and subtracting the angles.
285 </p>
286 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
287 The dividend, <code><var>A_REP</var></code>,
288 has angle <code><var>A_ANGLE_REP</var></code>
289 and radius <code><var>A_RADIUS_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
290 </p>
291 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
292 The divisor, <code><var>B_REP</var></code>,
293 has angle <code><var>B_ANGLE_REP</var></code>
294 and radius <code><var>B_RADIUS_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
295 </p>
296 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
297 The radius of the result will be
298 <code>\dfrac{<var>A_RADIUS_REP</var>}{<var>B_RADIUS_REP</var>} = <var>ANSWER_RADIUS_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
299 </p>
2e12f20 John Resig Run clean-exercises on the HTML exercises, fixing the entities inside th...
jeresig authored
300 <div data-if="A_ANGLE_NUMERATOR - B_ANGLE_NUMERATOR < 0" data-unwrap="">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
301 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
302 The difference of the angles is
303 <code><var>A_ANGLE_REP</var> - <var>B_ANGLE_REP</var> = <var>INTERMEDIATE_ANGLE_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
304 </p>
305 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
306 The angle <code><var>INTERMEDIATE_ANGLE_REP</var></code> is negative.
307 A complex number goes a full circle if its angle is increased by <code>2 \pi</code>, so it goes back to itself.
308 Because of that, angles of complex numbers are convenient to keep between <code>0</code> and <code>2 \pi</code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
309 </p>
310 <p>
311 <code><var>INTERMEDIATE_ANGLE_REP</var> + 2 \pi = <var>ANSWER_ANGLE_REP</var></code>
312 </p>
313 </div>
e9807ff John Resig Clean up the exercise files using the new cleaning utility.
jeresig authored
314 <p data-else="">
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
315 The angle of the result is <code><var>A_ANGLE_REP</var> - <var>B_ANGLE_REP</var> = <var>ANSWER_ANGLE_REP</var></code>.
316 </p>
317 <p>
8cb8aea Peter Collingridge Fix typo and expand colour coding
petercollingridge authored
318 The radius of the result is <code><var>ANSWER_RADIUS_REP</var></code>
319 and the angle of the result is <code><var>ANSWER_ANGLE_REP</var></code>.
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
320 </p>
321 </div>
322 </div>
323 </div>
324 </div>
cde9e9f John Resig Re-run the exercises through the updated cleaner.
jeresig authored
325 </body>
326 </html>
Something went wrong with that request. Please try again.