Minor performance tweaks.
git-svn-id: https://triangle.svn.codeplex.com/svn@71767 0e2699bc-83d4-4a8f-98e7-55e24ab8c7a5
This commit is contained in:
@@ -3999,21 +3999,21 @@ namespace TriangleNet
|
|||||||
// The edge opposite the apex is longest.
|
// The edge opposite the apex is longest.
|
||||||
maxedge = apexlen;
|
maxedge = apexlen;
|
||||||
// Find the cosine of the angle at the apex.
|
// Find the cosine of the angle at the apex.
|
||||||
maxangle = (orglen + destlen - apexlen) / (2 * Math.Sqrt(orglen) * Math.Sqrt(destlen));
|
maxangle = (orglen + destlen - apexlen) / (2 * Math.Sqrt(orglen * destlen));
|
||||||
}
|
}
|
||||||
else if (orglen > destlen)
|
else if (orglen > destlen)
|
||||||
{
|
{
|
||||||
// The edge opposite the origin is longest.
|
// The edge opposite the origin is longest.
|
||||||
maxedge = orglen;
|
maxedge = orglen;
|
||||||
// Find the cosine of the angle at the origin.
|
// Find the cosine of the angle at the origin.
|
||||||
maxangle = (apexlen + destlen - orglen) / (2 * Math.Sqrt(apexlen) * Math.Sqrt(destlen));
|
maxangle = (apexlen + destlen - orglen) / (2 * Math.Sqrt(apexlen * destlen));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The edge opposite the destination is longest.
|
// The edge opposite the destination is longest.
|
||||||
maxedge = destlen;
|
maxedge = destlen;
|
||||||
// Find the cosine of the angle at the destination.
|
// Find the cosine of the angle at the destination.
|
||||||
maxangle = (apexlen + orglen - destlen) / (2 * Math.Sqrt(apexlen) * Math.Sqrt(orglen));
|
maxangle = (apexlen + orglen - destlen) / (2 * Math.Sqrt(apexlen * orglen));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -464,21 +464,21 @@ namespace TriangleNet
|
|||||||
// The edge opposite the apex is longest.
|
// The edge opposite the apex is longest.
|
||||||
// maxedge = apexlen;
|
// maxedge = apexlen;
|
||||||
// Find the cosine of the angle at the apex.
|
// Find the cosine of the angle at the apex.
|
||||||
maxangle = (orglen + destlen - apexlen) / (2 * Math.Sqrt(orglen) * Math.Sqrt(destlen));
|
maxangle = (orglen + destlen - apexlen) / (2 * Math.Sqrt(orglen * destlen));
|
||||||
}
|
}
|
||||||
else if (orglen > destlen)
|
else if (orglen > destlen)
|
||||||
{
|
{
|
||||||
// The edge opposite the origin is longest.
|
// The edge opposite the origin is longest.
|
||||||
// maxedge = orglen;
|
// maxedge = orglen;
|
||||||
// Find the cosine of the angle at the origin.
|
// Find the cosine of the angle at the origin.
|
||||||
maxangle = (apexlen + destlen - orglen) / (2 * Math.Sqrt(apexlen) * Math.Sqrt(destlen));
|
maxangle = (apexlen + destlen - orglen) / (2 * Math.Sqrt(apexlen * destlen));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The edge opposite the destination is longest.
|
// The edge opposite the destination is longest.
|
||||||
// maxedge = destlen;
|
// maxedge = destlen;
|
||||||
// Find the cosine of the angle at the destination.
|
// Find the cosine of the angle at the destination.
|
||||||
maxangle = (apexlen + orglen - destlen) / (2 * Math.Sqrt(apexlen) * Math.Sqrt(orglen));
|
maxangle = (apexlen + orglen - destlen) / (2 * Math.Sqrt(apexlen * orglen));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether the angle is smaller than permitted.
|
// Check whether the angle is smaller than permitted.
|
||||||
|
|||||||
Reference in New Issue
Block a user