зеркало из https://github.com/SixLabors/Shapes.git
fix precision tests
This commit is contained in:
Родитель
c5e761fa68
Коммит
68f882ffcc
|
@ -56,7 +56,7 @@ namespace SixLabors.Shapes.Tests
|
|||
public void GeneratesCorrectPath()
|
||||
{
|
||||
float radius = 10;
|
||||
int pointsCount = new Random().Next(3, 99);
|
||||
int pointsCount = new Random().Next(3, 20);
|
||||
|
||||
var poly = new RegularPolygon(Vector2.Zero, pointsCount, radius, 0);
|
||||
var path = poly.AsPath();
|
||||
|
@ -76,8 +76,8 @@ namespace SixLabors.Shapes.Tests
|
|||
}
|
||||
|
||||
var actual = Vector2.Distance(points[i], points[j]);
|
||||
Assert.Equal(baseline, actual, 4);
|
||||
Assert.Equal(radius, Vector2.Distance(Vector2.Zero, points[i]), 4);
|
||||
Assert.Equal(baseline, actual, 3);
|
||||
Assert.Equal(radius, Vector2.Distance(Vector2.Zero, points[i]), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче