mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Allow comma in input expression
Calculator now supports a comma as decimal seperator.
This commit is contained in:
parent
8dc8431c0e
commit
24fa234c9b
1 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
|
|
@ -34,7 +34,8 @@ namespace Wox.Plugin.Caculator
|
|||
|
||||
try
|
||||
{
|
||||
var result = MagesEngine.Interpret(query.Search);
|
||||
var expression = query.Search.Replace(",", ".");
|
||||
var result = MagesEngine.Interpret(expression);
|
||||
|
||||
if (result.ToString() == "NaN")
|
||||
result = Context.API.GetTranslation("wox_plugin_calculator_not_a_number");
|
||||
|
|
|
|||
Loading…
Reference in a new issue