Skip to content

Commit 4ac76c6

Browse files
authored
Merge pull request #899 from EriWong/mergeFeature
Merge graphing calculator into master
2 parents cb707d4 + 09926e4 commit 4ac76c6

File tree

128 files changed

+15946
-929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+15946
-929
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ We also welcome [issues submitted on GitHub](https://github.com/Microsoft/calcul
5151
## Roadmap
5252
For information regarding Windows Calculator plans and release schedule, please see the [Windows Calculator Roadmap](docs/Roadmap.md).
5353
54+
### Graphing Mode
55+
Adding graphing calculator functionality [is on the project roadmap](https://github.com/Microsoft/calculator/issues/338) and we hope that this project can create a great end-user experience around graphing. To that end, the UI from the official in-box Windows Calculator is currently part of this repository, although the proprietary Microsoft-built graphing engine, which also drives graphing in Microsoft Mathematics and OneNote, is not. Community members can still be involved in the creation of the UI, however developer builds will not have graphing functionality due to the use of a [mock implementation of the engine](/src/MockGraphingImpl) built on top of a
56+
[common graphing API](/src/GraphingInterfaces).
57+
5458
## Diagnostic Data
5559
This project collects usage data and sends it to Microsoft to help improve our products and services.
5660
Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkId=521839) to learn more.

docs/ManualTests.md

Lines changed: 130 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -260,17 +260,19 @@ Steps:
260260
4. While in the Menu: Check the About Page
261261
*Expected: Everything in the about page fits into its window*
262262
5. For Scientific Mode: At a Larger Scale
263-
*Expected: All buttons are present and the up arrow is grayed out.*
263+
*Expected: All buttons are present and the 2nd button is grayed out.*
264264
6. For Scientific Mode: At a Smaller Scale
265-
*Expected: All buttons are present and the up arrow is able to be toggled.*
265+
*Expected: All buttons are present and the 2nd button is able to be toggled.*
266266
7. For Programmer Mode: At a Any Scale
267-
*Expected: All buttons are present and the up arrow is able to be toggled.*
267+
*Expected: All buttons are present and the 2nd button is able to be toggled.*
268268
8. For Converter Mode: While Scaling
269269
*Expected: The number pad and input areas move around each other gracefully.*
270-
9. Changing Language: Open Settings app > Time & language > Region & language > Add a language > Select a Right to Left (RTL) language such as Hebrew > Install the associated files> Set it to the system default.
271-
10. Set the system number format preference: Open a Run dialog (WIN + R) > type ‘intl.cpl’ > Enter > In the format dropdown list > Select Hebrew > Apply.
272-
11. Initiating the change: Package has completed installing > Sign out > Sign in. (This change to the app may also require a reinstallation of the build)
273-
12. Repeat Steps 2-6 again in a (RTL) language.
270+
9. For Graphing Mode: While Scaling
271+
*Expected: The number pad, graph area, and input areas move around each other gracefully.*
272+
10. Changing Language: Open Settings app > Time & language > Region & language > Add a language > Select a Right to Left (RTL) language such as Hebrew > Install the associated files> Set it to the system default.
273+
11. Set the system number format preference: Open a Run dialog (WIN + R) > type ‘intl.cpl’ > Enter > In the format dropdown list > Select Hebrew > Apply.
274+
12. Initiating the change: Package has completed installing > Sign out > Sign in. (This change to the app may also require a reinstallation of the build)
275+
13. Repeat Steps 2-6 again in a (RTL) language.
274276
*Expected: No elements fall out of intended boundaries.*
275277

276278

@@ -302,11 +304,60 @@ Verify the following:
302304
11. "Bin" Binary:
303305
*Expected: A B C D E F 2 3 4 5 6 7 8 9 are inactive. A maximum of 64 characters can be entered.*
304306

307+
**Graphing Mode Test: Verify Graphing mode functions**
308+
Steps:
309+
1. Launch the "Calculator" app
310+
2. Navigate to "Graphing" Calculator
311+
3. Enter a function of x in the input field <br>
312+
*Expected: Function is plotted in the graph area. Line color matches the colored square next to the input field*
313+
4. Select the "+" button below the function input and enter more functions in the fields that appear <br>
314+
*Expected: All functions are plotted in the graph area and match the colors of the input field squares*
315+
5. Select the colored square for any function <br>
316+
*Expected: Visibility of the function in the graph is toggled off/on*
317+
6. Select the "Zoom In", "Zoom Out", and "Reset View' buttons in the graph area <br>
318+
*Expected: Both X and Y axes zoom in, out, and revert to default settings, respectively*
319+
7. Select the Trace button, then click + drag the graph until the red square is near a graphed function<br>
320+
*Expected: Closest (X, Y) coordinates of the function to the red square are displayed with a black dot to indicate the location*
321+
8. Enter "y=mx+b" into a function input field, then select "Variables" button <br>
322+
*Expected: y=x+1 function is plotted in the graph, "Variables" modal window shows two variables "m" and "b" with values set to 1.*
323+
9. Adjust the value, minimum, maximum, and step for each variable <br>
324+
*Expected: y=mx+b graph adjusts to the new values for m and b, step size changes the increments of the slider for each value*
325+
10. Share the graph via OneNote, Outlook/Mail, Twitter, and Feedback Hub <br>
326+
*Expected: Modifiable message that contains an image of the graph customized for the chosen application opens*
327+
11. Verify Key Graph Features tab shows the correct information for the following functions: <br>
328+
*(Note: IP = Inflection Points, VA = Vertical Asymptotes, HA = Horizontal Asymptotes, OA = Oblique Asymptotes)* <br>
329+
a. **y=x** <br>
330+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: ⁅y∈ℝ⁆; X/Y Intercepts: (0)/(0); Max: none; Min: none; IP: none; VA: none; HA: none; OA: none; Parity: Odd; Monotonicity: (-∞, ∞) Increasing* <br>
331+
b. **y=1/x** <br>
332+
*Expected: Domain: ⁅𝑥≠0⁆; Range: ⁅y∈ℝ\{0}⁆; X/Y Intercepts: ø/ø; Max: none; Min: none; IP: none; VA: x=0; HA: y=0; OA: none; Parity: Odd; Monotonicity: (0, ∞) Decreasing, (-∞, 0) Increasing* <br>
333+
c. **y=x^2** <br>
334+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: ⁅y∈{0, ∞)⁆; X/Y Intercepts: (0)/(0); Max: none; Min: (0,0); IP: none; VA: none; HA: none; OA: none; Parity: Even; Monotonicity: (0, ∞) Increasing, (-∞, 0) Decreasing* <br>
335+
d. **y=x^3** <br>
336+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: ⁅y∈ℝ⁆; X/Y Intercepts: (0)/(0); Max: none; Min: none; IP: (0,0); VA: none; HA: none; OA: none; Parity: Odd; Monotonicity: (-∞, ∞) Increasing* <br>
337+
e. **y=e^x** <br>
338+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: ⁅y∈(0, ∞)⁆; X/Y Intercepts: ø/(1); Max: none; Min: none; IP: none; VA: none; HA: y=0; OA: none; Parity: none; Monotonicity: (-∞, ∞) Increasing* <br>
339+
f. **y=ln(x)** <br>
340+
*Expected: Domain: ⁅𝑥>0⁆; Range: ⁅y∈ℝ⁆; X/Y Intercepts: (1)/ø; Max: none; Min: none; IP: none; VA: x=0; HA: none; OA: none; Parity: none; Monotonicity: (0, ∞) Increasing* <br>
341+
g. **y=sin(x)** <br>
342+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: ⁅𝑦∈[−1,1]⁆; X/Y Intercepts: (⁅𝜋n1,n1∈ℤ⁆)/(0); Max: ⁅(2𝜋n1+𝜋/2,1),n1∈ℤ⁆; Min: ⁅(2𝜋n1+3𝜋/2,−1),n1∈ℤ⁆; IP: ⁅(𝜋n1,0),n1∈ℤ⁆; VA: none; HA: none; OA: none; Parity: Odd; Monotonicity: ⁅(2𝜋n1+𝜋/2,2𝜋n1+3𝜋/2),n1∈ℤ⁆ Decreasing; ⁅(2𝜋n1+3𝜋/2,2𝜋n1+5𝜋/2),n1∈ℤ⁆ Increasing; Period: 2𝜋* <br>
343+
h. **y=cos(x)** <br>
344+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: ⁅𝑦∈[−1,1]⁆; X/Y Intercepts: (⁅𝜋n1+𝜋/2,n1∈ℤ⁆)/(1); Max: ⁅(2𝜋n1,1),n1∈ℤ⁆; Min: ⁅(2𝜋n1+𝜋,-1),n1∈ℤ⁆; IP: ⁅(𝜋n1+𝜋/2,0),n1∈ℤ⁆; VA: none; HA: none; OA: none; Parity: Even; Monotonicity: ⁅(2𝜋n1+𝜋,2𝜋n1+2𝜋),n1∈ℤ⁆ Increasing, ⁅(2𝜋n1,2𝜋n1+𝜋),n1∈ℤ⁆ Decreasing; Period: 2𝜋* <br>
345+
i. **y=tan(x)** <br>
346+
*Expected: Domain: ⁅x≠𝜋n1+𝜋/2,∀n1∈ℤ⁆; Range: ⁅𝑦∈ℝ⁆; X/Y Intercepts: (x=𝜋n1, n1 ∈ℤ)/(0); Max: none; Min: none; IP: x=𝜋n1, n1 ∈ℤ; VA: x=𝜋n1+𝜋/2, n1∈ℤ; HA: none; OA: none; Parity: Odd; Monotonicity: ⁅(𝜋n1+𝜋/2,𝜋n1+3𝜋/2),n1∈ℤ⁆ Increasing; Period: 𝜋* <br>
347+
j. **y=sqrt(25-x^2)** <br>
348+
*Expected: Domain: ⁅x∈[-5,5]⁆; Range: ⁅𝑦∈[0,5]⁆; X/Y Intercepts: (5),(-5)/(5); Max: (0,5); Min: (-5,0) and (5,0); IP: none; VA: none; HA: none; OA: none; Parity: Even; Monotonicity: (0,5) Decreasing, (-5,0) Increasing* <br>
349+
k. **y=(-3x^2+2)/(x-1)** <br>
350+
*Expected: Domain: ⁅x≠1⁆; Range: ⁅𝑦∈(-∞, -2√3 - 6}U{2√3 -6,∞⁆; X/Y Intercepts: (-√6/3),(√6/3)/(-2); Max: ⁅(√3/3+1,-2√3−6)⁆; Min: ⁅(−√3/3+1,2√3−6)⁆; IP: none; VA: x=1; HA: none; OA: y=-3x-3; Parity: none; Monotonicity: (√3/3+1,∞) Decreasing, (1,√3/3+1,) Increasing(-√3/3+1,1), Increasing, (-∞,-√3/3+1) Decreasing* <br>
351+
l. **y=sin(sin(x))** ("too complex" error test) <br>
352+
*Expected: Domain: ⁅𝑥∈ℝ⁆; Range: Unable to calculate range for this function; X/Y Intercepts: none; Max: none; Min: none; IP: none; VA: none; HA: none; OA: none; Parity: odd; Monotonicity: Unable to determine the monotonicity of the function* <br>
353+
*These features are too complex for Calculator to calculate: Range, X Intercept, Period, Minima, Maxima, Inflection Points, Monotonicity*
354+
m. **y=mx+b** <br>
355+
*Expected: Analysis is not supported for this function*
305356

306357
**Date Calculation Test: Verify dates can be calculated.**
307358
Steps:
308-
1. Launch the "Calculator" app.
309-
2. Navigate to "Date Calculation" Calculator.
359+
1. Launch the "Calculator" app
360+
2. Navigate to "Date Calculation" Calculator
310361
3. With "Difference between dates" Selected
311362
Change the various date input fields
312363
*Expected: From and To reflect dates input respectively.*
@@ -332,80 +383,88 @@ Steps:
332383
1. Launch the "Calculator" app.
333384

334385
For All Applicable Modes verify the following (note: only 11-15 and 20 work in Always-on-Top mode):
335-
2. Press **Alt +1** to Enter "Standard" mode
386+
2. Press **Alt +1** to enter "Standard" mode
336387
*Expected: Move to "Standard" screen.*
337-
3. Press **Alt +2** to Enter "Scientific" mode
388+
3. Press **Alt +2** to enter "Scientific" mode
338389
*Expected: Move to "Scientific" screen.*
339-
4. Press **Alt +3** to Enter "Programmer" mode
390+
4. Press **Alt +3** to enter "Programmer" mode
340391
*Expected: Move to "Programming" screen.*
341-
5. Press **Alt +4** to Enter "Date Calculation" mode
392+
5. Press **Alt +4** to enter "Date Calculation" mode
342393
*Expected: Move to "Date Calculation" screen.*
343-
6. Press **Ctrl +M** to Store in Memory
344-
7. Press **Ctrl +P** to Add to Active Memory
345-
8. Press **Ctrl +Q** to Subtract form Active Memory
346-
9. Press **Ctrl +R** to Recall from Memory
347-
10. Press **Ctrl +L** to Clear from Memory
348-
11. Press **Delete** to Clear Current Input 'CE'
349-
12. Press **Esc** to Full Clear Input 'C'
350-
13. Press **F9** to Toggle '±'
351-
14. Press **R** to Select '1/x'
352-
15. Press **@** to Select '√'
353-
16. Press **Ctrl + H** to Toggle History Panel
394+
6 Press **Alt +5** to enter "Graphing" mode
395+
*Expected: Move to "Graphing" screen.*
396+
7. Press **Ctrl +M** to Store in Memory
397+
8. Press **Ctrl +P** to Add to Active Memory
398+
9. Press **Ctrl +Q** to Subtract form Active Memory
399+
10. Press **Ctrl +R** to Recall from Memory
400+
11. Press **Ctrl +L** to Clear from Memory
401+
12. Press **Delete** to Clear Current Input 'CE'
402+
13. Press **Esc** to Full Clear Input 'C'
403+
14. Press **F9** to Toggle '±'
404+
15. Press **R** to Select '1/x'
405+
16. Press **@** to Select '√'
406+
17. Press **Ctrl + H** to Toggle History Panel
354407
*Expected: Function when in small scale window.*
355-
17. Press **Up arrow** to Move up History Panel
408+
18. Press **Up arrow** to Move up History Panel
356409
*Expected: Function when in small scale window.*
357-
18. Press **Down arrow** to Move Down History Panel
410+
19. Press **Down arrow** to Move Down History Panel
358411
*Expected: Function when in small scale window.*
359-
19. Press **Ctrl + Shift + D** to Clear History Panel
412+
20. Press **Ctrl + Shift + D** to Clear History Panel
360413
*Expected: Function when in small scale window.*
361-
20. Press **Spacebar** to Repeat Last Input
414+
21. Press **Spacebar** to Repeat Last Input
362415

363416
Verify the following in Scientific Mode
364-
21. Press **F3** to Select 'DEG'
365-
22. Press **F4** to Select 'RAD'
366-
23. Press **F5** to Select 'GRAD'
367-
24. Press **Ctrl +G** to Select '10ˣ'
368-
25. Press **Ctrl +Y** to Select 'y√x'
369-
26. Press **Shift +O** to Select 'sin-1'
370-
27. Press **Shift + S** to Select 'cos-1'
371-
28. Press **Shift +T** to Select 'tan-1'
372-
29. Press **Ctrl +O** to Select 'Cosh'
373-
30. Press **Ctrl +S** to Select 'Sinh'
374-
31. Press **Ctrl +T** to Select 'Tanh'
375-
32. Press **D** to Select 'Mod'
376-
33. Press **L** to Select 'log'
377-
34. Press **M** to Select 'dms'
378-
35. Press **N** to Select 'ln'
379-
36. Press **Ctrl +N** to Select 'ex'
380-
37. Press **O** to Select 'Cos'
381-
38. Press **P** to Select 'π'
382-
39. Press **Q** to Select 'x²'
383-
40. Press **S** to Select 'Sin'
384-
41. Press **T** to Select 'Tan'
385-
42. Press **V** to Toggle 'F-E'
386-
43. Press **X** to Select 'Exp'
387-
44. Press **Y** or **^** to Select 'xʸ'
388-
45. Press **#** to Select 'x³'
389-
46. Press **!** to Select 'n!'
417+
22. Press **F3** to Select 'DEG'
418+
23. Press **F4** to Select 'RAD'
419+
24. Press **F5** to Select 'GRAD'
420+
25. Press **Ctrl +G** to Select '10ˣ'
421+
26. Press **Ctrl +Y** to Select 'y√x'
422+
27. Press **Shift +O** to Select 'sin-1'
423+
28. Press **Shift + S** to Select 'cos-1'
424+
29. Press **Shift +T** to Select 'tan-1'
425+
30. Press **Ctrl +O** to Select 'Cosh'
426+
31. Press **Ctrl +S** to Select 'Sinh'
427+
32. Press **Ctrl +T** to Select 'Tanh'
428+
33. Press **D** to Select 'Mod'
429+
34. Press **L** to Select 'log'
430+
35. Press **M** to Select 'dms'
431+
36. Press **N** to Select 'ln'
432+
37. Press **Ctrl +N** to Select 'ex'
433+
38. Press **O** to Select 'Cos'
434+
39. Press **P** to Select 'π'
435+
40. Press **Q** to Select 'x²'
436+
41. Press **S** to Select 'Sin'
437+
42. Press **T** to Select 'Tan'
438+
43. Press **V** to Toggle 'F-E'
439+
44. Press **X** to Select 'Exp'
440+
45. Press **Y** or **^** to Select 'xʸ'
441+
46. Press **#** to Select 'x³'
442+
47. Press **!** to Select 'n!'
390443

391444
Verify the following in Programmer Mode
392-
47. Press **F2** to Select 'DWORD'
393-
48. Press **F3** to Select 'WORD'
394-
49. Press **F4** to Select 'BYTE'
395-
50. Press **F5** to Select 'HEX'
396-
51. Press **F6** to Select 'DEC'
397-
52. Press **F7** to Select 'OCT'
398-
53. Press **F8** to Select 'BIN'
399-
54. Press **F12** to Select 'QWORD'
400-
55. Press **A-F** to Input in HEX
401-
56. Press **J** to Select 'RoL'
402-
57. Press **K** to Select 'RoR'
403-
58. Press **<** to Select 'Lsh'
404-
59. Press **>** to Select 'Rsh'
405-
60. Press **%** to Select 'Mod'
406-
61. Press **|** to Select 'Or'
407-
62. Press **~** to Select 'Not'
408-
63. Press **&** to Select 'And'
445+
48. Press **F2** to Select 'DWORD'
446+
49. Press **F3** to Select 'WORD'
447+
50. Press **F4** to Select 'BYTE'
448+
51. Press **F5** to Select 'HEX'
449+
52. Press **F6** to Select 'DEC'
450+
53. Press **F7** to Select 'OCT'
451+
54. Press **F8** to Select 'BIN'
452+
55. Press **F12** to Select 'QWORD'
453+
56. Press **A-F** to Input in HEX
454+
57. Press **J** to Select 'RoL'
455+
58. Press **K** to Select 'RoR'
456+
59. Press **<** to Select 'Lsh'
457+
60. Press **>** to Select 'Rsh'
458+
61. Press **%** to Select 'Mod'
459+
62. Press **|** to Select 'Or'
460+
63. Press **~** to Select 'Not'
461+
64. Press **&** to Select 'And'
462+
463+
Verify the following in Graphing Mode
464+
65. Press **x** to Select 'x'
465+
66. Press **y** to Select 'y'
466+
67. Press **Ctrl +[Numpad+]** to Select 'Zoom In'
467+
68. Press **Ctrl +[Numpad-]** to Select 'Zoom Out'
409468

410469
## Localization Tests
411470

nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
<config>
44
<add key="repositorypath" value=".\packages" />
55
</config>
6-
</configuration>
6+
</configuration>

src/CalcManager/CalcManager.vcxproj

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -132,29 +132,9 @@
132132
</ImportGroup>
133133
<PropertyGroup Label="UserMacros" />
134134
<PropertyGroup />
135-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
136-
<GenerateManifest>false</GenerateManifest>
137-
</PropertyGroup>
138-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
139-
<GenerateManifest>false</GenerateManifest>
140-
</PropertyGroup>
141-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
142-
<GenerateManifest>false</GenerateManifest>
143-
</PropertyGroup>
144-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
145-
<GenerateManifest>false</GenerateManifest>
146-
</PropertyGroup>
147-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
148-
<GenerateManifest>false</GenerateManifest>
149-
</PropertyGroup>
150-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
151-
<GenerateManifest>false</GenerateManifest>
152-
</PropertyGroup>
153-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
154-
<GenerateManifest>false</GenerateManifest>
155-
</PropertyGroup>
156-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
135+
<PropertyGroup>
157136
<GenerateManifest>false</GenerateManifest>
137+
<GenerateProjectSpecificOutputFolder>true</GenerateProjectSpecificOutputFolder>
158138
</PropertyGroup>
159139
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
160140
<ClCompile>
@@ -366,4 +346,4 @@
366346
</ItemGroup>
367347
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
368348
<ImportGroup Label="ExtensionTargets" />
369-
</Project>
349+
</Project>

0 commit comments

Comments
 (0)