How to use the generic.sign function in generic

To help you get started, we’ve selected a few generic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects.py View on Github external
@sign(Point, Point)
def initfrompoint(self, p):
    self.geo = p.geo
github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects.py View on Github external
    @sign(ElementFactory, Number)
    def initfromnumber(self, factory, x):
        expr = factory.api.numberExpression(float(x))
        Expression.__init__(self, factory, expr)
github geogebra / geogebra / geogebra / plugin / jython / pyggb.py View on Github external
@Point.init.spec
@sign(Point, Point)
def initfrompoint(self, p):
    self.geo = p.geo
github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects.py View on Github external
    @sign(VectorThing)
    def initfromexpr(self, e):
        self.geo = self._api.geoVector(self._factory.expression(e).expr)
github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects.py View on Github external
    @sign(Point, Point, Point)
    def initfrom3points(self, p, q, r):
        self.geo = self._api.geoCirclePPP(p.geo, q.geo, r.geo)
github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects_flat.py View on Github external
    @sign(Point, Numeric)
    def initfromcentreandradius(self, c, r):
        self.geo = self._api.geoCircleCR(
            c.geo,
            self._factory.element(r).geo
        )
github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects.py View on Github external
    @sign(Line, Conic)
    def lineconic(self, l, c):
        return self._api.intersectLineConic(l.geo, c.geo)
github geogebra / geogebra / geogebra / plugin / jython / pyggb.py View on Github external
    @specmethod.init
    @sign(Point, Numeric)
    def initfromcentreandradius(self, c, r):
        self.geo = _kernel.Circle(None, c.geo, element(r).geo)
github geogebra / geogebra / desktop / geogebra / plugin / jython / pygeo / objects.py View on Github external
    @sign(ElementFactory, NumberThing, NumberThing)
    def initfromcoords(self, factory, x, y):
        x, y = factory.expression(x), factory.expression(y)
        expr = factory.api.vectorExpression(x.expr, y.expr)
        Expression.__init__(self, factory, expr)
github geogebra / geogebra / geogebra / plugin / jython / pyggb.py View on Github external
@Line.init.spec
@sign(Line, Point, Line)
def initfrompointandline(self, p, l):
    return _kernel.Line(None, p.geo, l.geo)