Skip to content

Commit 4e03b76

Browse files
cleanup
1 parent 81d5065 commit 4e03b76

File tree

1 file changed

+3
-7
lines changed
  • Plugins/Flow.Launcher.Plugin.Calculator

1 file changed

+3
-7
lines changed

Plugins/Flow.Launcher.Plugin.Calculator/Main.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
using Mages.Core;
88
using Flow.Launcher.Plugin.Calculator.ViewModels;
99
using Flow.Launcher.Plugin.Calculator.Views;
10-
using System.IO;
11-
using System.Net.Quic;
10+
1211

1312
namespace Flow.Launcher.Plugin.Calculator
1413
{
@@ -23,7 +22,6 @@ public class Main : IPlugin, IPluginI18n, ISettingProvider
2322
@"factorial|sign|isprime|isinfty|" +
2423
@"==|~=|&&|\|\||(?:\<|\>)=?|" +
2524
@"[ei]|[0-9]|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
26-
2725
@")+$", RegexOptions.Compiled);
2826
private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled);
2927
private static Engine MagesEngine;
@@ -47,9 +45,7 @@ public void Init(PluginInitContext context)
4745
{
4846
{ "e", Math.E }, // e is not contained in the default mages engine
4947
}
50-
}
51-
);
52-
;
48+
});
5349
Func<double, double> rad2deg = (rad) => rad * (180.0 / Math.PI);
5450
MagesEngine.SetFunction("rad2deg", rad2deg);
5551
MagesEngine.SetFunction("deg2rad", (double x) => x * (Math.PI / 180.0));
@@ -76,7 +72,7 @@ public List<Result> Query(Query query)
7672
expression = query.Search;
7773
break;
7874
}
79-
// Replace all spaces in the expression
75+
8076
var result = MagesEngine.Interpret(expression);
8177

8278
if (result?.ToString() == "NaN")

0 commit comments

Comments
 (0)