-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Шевырин Никита #245
base: master
Are you sure you want to change the base?
Шевырин Никита #245
Conversation
|
||
[TestFixture] | ||
[TestOf(typeof(CircularCloudLayouter))] | ||
public class CircularCloudLayouterTest |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
var isCenterTest = context.Test.MethodName.Contains(nameof(RectanglesCommonBarycenterIsCloseToTheProvidedCenter)); | ||
if (isCenterTest) | ||
{ | ||
graphics.DrawEllipse( |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
graphics.Clear(Color.White); | ||
graphics.DrawRectangles(new Pen(Color.Blue), rectangles); | ||
|
||
var isCenterTest = context.Test.MethodName.Contains(nameof(RectanglesCommonBarycenterIsCloseToTheProvidedCenter)); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
return new CircularCloudLayouter(new Point(centerX, centerY)); | ||
} | ||
|
||
private readonly struct RectanglePair(Rectangle rectangle1, Rectangle rectangle2) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
deviationFromCenter.Should().BeLessOrEqualTo(maxDistanceFromBarycenter * maxDistanceFromBarycenter); | ||
} | ||
|
||
private static object[][] IntersectionTestSource() |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
public Rectangle PutNextRectangle(Size rectangleSize) | ||
{ | ||
if (rectangleSize.Width <= 0 || rectangleSize.Height <= 0) | ||
throw new ArgumentException("rectangle width and height must be greater than 0"); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
private static readonly double angleStep = Math.PI / 2; | ||
private static readonly float tracingStep = 0.01f; | ||
private static readonly float maxTracingDistance = 500f; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -0,0 +1,3 @@ | |||
// See https://aka.ms/new-console-template for more information | |||
|
|||
Console.WriteLine("Hello, World!"); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
var bitmap = new Bitmap(1000, 1000); | ||
var graphics = Graphics.FromImage(bitmap); | ||
graphics.Clear(Color.White); | ||
graphics.DrawRectangles(new Pen(Color.Blue), rectangles); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
using NUnit.Framework; | ||
using NUnit.Framework.Interfaces; | ||
|
||
namespace TagsCloudVisualization.Tests; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хочется тест на то, что прямоугольники действительно располагаются по спирали
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Насколько я понял, в задании не требуется располагать их именно по спирали, да и я немного другой алгоритм реализовал
No description provided.