[gnome-calculator] Define 'pi' variable (refs #153)
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] Define 'pi' variable (refs #153)
- Date: Thu, 4 Jun 2020 10:04:54 +0000 (UTC)
commit f8bb81ccd279fbc95c6c4c59c517f51a9808145b
Author: Robert Roth <robert roth off gmail com>
Date: Thu Jun 4 13:04:29 2020 +0300
Define 'pi' variable (refs #153)
lib/equation.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/equation.vala b/lib/equation.vala
index d5ab0f3d..50fda3a7 100644
--- a/lib/equation.vala
+++ b/lib/equation.vala
@@ -166,7 +166,7 @@ private class EquationParser : Parser
protected override bool variable_is_defined (string name)
{
/* FIXME: Make more generic */
- if (name == "e" || name == "i" || name == "π")
+ if (name == "e" || name == "i" || name == "π" || name == "pi")
return true;
return equation.variable_is_defined (name);
@@ -178,7 +178,7 @@ private class EquationParser : Parser
return new Number.eulers ();
else if (name == "i")
return new Number.i ();
- else if (name == "π")
+ else if (name == "π" || name == "pi")
return new Number.pi ();
else
return equation.get_variable (name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]