mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
PowerToys Run Calculator: Add trigonometric angle unit conversion functions (#37475)
* Added trig unit conversion macros to PowerToys Run Calculator plugin. * Added testing for unit conversions. * Removed debug messages.
This commit is contained in:
@@ -59,8 +59,14 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
|
||||
input = CalculateHelper.FixHumanMultiplicationExpressions(input);
|
||||
|
||||
// Get the user selected trigonometry unit
|
||||
TrigMode trigMode = Main.GetTrigMode();
|
||||
|
||||
// Modify trig functions depending on angle unit setting
|
||||
input = CalculateHelper.UpdateTrigFunctions(input, Main.GetTrigMode());
|
||||
input = CalculateHelper.UpdateTrigFunctions(input, trigMode);
|
||||
|
||||
// Expand conversions between trig units
|
||||
input = CalculateHelper.ExpandTrigConversions(input, trigMode);
|
||||
|
||||
var result = _magesEngine.Interpret(input);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user