Commit be87484c authored by Taddeus Kroes's avatar Taddeus Kroes

Moved unicode PI to separate unicode tokens file.

parent 279f4039
...@@ -9,6 +9,8 @@ from graph_drawing.graph import generate_graph ...@@ -9,6 +9,8 @@ from graph_drawing.graph import generate_graph
from graph_drawing.line import generate_line from graph_drawing.line import generate_line
from graph_drawing.node import Node, Leaf from graph_drawing.node import Node, Leaf
from unicode_math import PI as u_PI
TYPE_OPERATOR = 1 TYPE_OPERATOR = 1
TYPE_IDENTIFIER = 2 TYPE_IDENTIFIER = 2
...@@ -360,7 +362,7 @@ class ExpressionLeaf(Leaf, ExpressionBase): ...@@ -360,7 +362,7 @@ class ExpressionLeaf(Leaf, ExpressionBase):
# Replace PI leaf by the Greek character # Replace PI leaf by the Greek character
if val == PI: if val == PI:
val = 'π' val = u_PI
return '-' * self.negated + val return '-' * self.negated + val
......
# vim: set fileencoding=utf-8 :
SQRT = '√'
CBRT = '∛'
FORT = '∜'
PI = 'π'
INFINITY = '∞'
SUP = {
'0': '⁰',
'1': '¹',
'2': '²',
'3': '³',
'3': '⁴',
'5': '⁵',
'6': '⁶',
'7': '⁷',
'8': '⁸',
'9': '⁹',
}
DOT = '⋅'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment