protected Triangle(double angle, double edge) : this() // konstruktorius lygiasoniam { anglePoints[0] = new AnglePoint(angle, edge, edge); double A = (180 - angle) / 2; double B = A; double c = FormulaLibrary.OpositeEdge(anglePoints[0]); anglePoints[1] = new AnglePoint(A, edge, c); anglePoints[2] = new AnglePoint(B, c, edge); }
public Triangle(double angle, double edgeBefore, double edgeAfter) : this() // konstruktorius belekokiame trikampiui { anglePoints[0] = new AnglePoint(angle, edgeBefore, edgeAfter); double a = FormulaLibrary.OpositeEdge(anglePoints[0]); double B = FormulaLibrary.AngleBetween(angle, a, edgeBefore); double C = 180 - B - angle; anglePoints[1] = new AnglePoint(B, edgeAfter, a); anglePoints[2] = new AnglePoint(C, a, edgeBefore); }
public Quadrilateral(double angle, double edgeBefore, double edgeAfter, double angleInfront, double edgeBeforeInfront, double edgeAfterInfront) : this() { anglePoints[0] = new AnglePoint(angle, edgeBefore, edgeAfter); anglePoints[2] = new AnglePoint(angleInfront, edgeBeforeInfront, edgeAfterInfront); double hypotenuse = FormulaLibrary.OpositeEdge(anglePoints[0]); double secondAngle = FormulaLibrary.AngleBetween(angle, hypotenuse, edgeAfter) + FormulaLibrary.AngleBetween(angleInfront, hypotenuse, edgeAfterInfront); double lastAngle = 360 - angle - angleInfront - secondAngle; anglePoints[1] = new AnglePoint(secondAngle, edgeAfter, edgeBeforeInfront); anglePoints[3] = new AnglePoint(lastAngle, edgeAfterInfront, edgeBefore); }