private RootLayer ParseRootLayerFromElements() { RootLayer layer = new RootLayer(); if (elements[0] is SqrtElement) { layer.NthRoot = new NumberLayer(2); ILayer baseOfRoot; ParseBeginWithoutParameterType(new List<IElement>(elements), out baseOfRoot); layer.BaseOfRoot = baseOfRoot; } if (elements[0] is RootElement) { ILayer nthRoot, baseOfRoot; ParseBeginWithParameterType(new List<IElement>(elements), out nthRoot, out baseOfRoot); layer.NthRoot = nthRoot; layer.BaseOfRoot = baseOfRoot; } return layer; }
public void Root(Term nthRoot) { RootLayer rootLayer = new RootLayer(); rootLayer.NthRoot = nthRoot.TopLayer; rootLayer.BaseOfRoot = topLayer; topLayer = rootLayer; }