Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plotter/view/puzzletree/nodes/e.py
blob: f26a7affc6688b9c89c35555b426d776ec6367db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# coding=utf-8

from .simplenode import SimpleNode
from gettext import gettext as _

import math


class E(SimpleNode):
    """Node representing e."""

    CLASS = "e"
    background = SimpleNode.loadbackground("e.svg")
    title = _("e")
    description = _(u"e is an irrational number such that the derivative "
            u"of f(x) = e ** x is f(x).\n"
            u"e is approximately 2.71828")

    def __call__(self, x):
        """Returns e."""
        return math.e


    def get_equation_string(self, variable):
        """Returns e, ignoring the variable."""
        return "e"