Fix KdTree.FindNearestNeighbours(k) returning the pivot itself

This commit is contained in:
BobLd
2020-04-28 22:01:50 +01:00
committed by Eliot Jones
parent 0512bb1e4f
commit bb33741552
5 changed files with 18 additions and 13 deletions

View File

@@ -81,6 +81,7 @@
/// <summary>
/// Rotation angle of the rectangle. Counterclockwise, in degrees.
/// <para>-180 ≤ θ ≤ 180</para>
/// </summary>
public double Rotation
{
@@ -173,6 +174,9 @@
BottomLeft.Translate(dx, dy), BottomRight.Translate(dx, dy));
}
/// <summary>
/// -π ≤ θ ≤ π
/// </summary>
private double GetT()
{
if (!BottomRight.Equals(BottomLeft))