static void Main() { double S_Square, S_Circle; Console.WriteLine("Введите площадь квадрата:"); S_Square = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Введите площадь круга:"); S_Circle = Convert.ToDouble(Console.ReadLine()); bool CircleIntoSquare = CheckShape.CircleIntoSquare(S_Square, S_Circle); bool SquareIntoCircle = CheckShape.ReferenceEquals(S_Square, S_Circle); bool impossible = false; if (SquareIntoCircle && CircleIntoSquare == false) { impossible = true; } if (CircleIntoSquare) { Console.WriteLine("Мы можем вписать данный круг в квадрат"); } else if (SquareIntoCircle) { Console.WriteLine("Мы можем вписать данный квадрат в круг"); } if (impossible) { Console.WriteLine("Мы не можем вписать круг в квадрат и квадрат в круг"); } }
public PositionInfo(CheckShape checkShape) { points = new List <Coords>(); centerPoints = new Coords(); length = 0; width = 0; height = 0; radius = 0; this.checkShape = checkShape; }
public DrawGeometry(Vector3 firstPos, Vector3 secondPos, Color faceColor, CheckShape checkShape) { // Shady : Setting the position of scene entities will be used back when sorting them from camera perspective back to front using (TSRVector3 centerPosition = new TSRVector3( 0.5f * (firstPos.x + secondPos.x), 0.5f * (firstPos.y + secondPos.y), 0.5f * (firstPos.z + secondPos.z))) { SetPosition(centerPosition); } this.firstPos = firstPos; this.secondPos = secondPos; this.faceColor = faceColor; lineColor = Color.FromArgb(255, faceColor.R, faceColor.G, faceColor.B); this.checkShape = checkShape; circlePos = new List <Vector3>(); }