Revert "Fix some problematic ellipse plotter cases (like 4x36)"

This reverts commit 1d7a75c8a9.
This commit is contained in:
elasota
2020-01-20 23:59:45 -05:00
parent c112738f2e
commit f5b0ef3698
2 changed files with 9 additions and 15 deletions

View File

@@ -73,9 +73,9 @@ namespace PortabilityLayer
const int32_t xStepCost = -m_xChangeCostDynamicFactor + m_xChangeCostStaticFactor;
const int32_t yStepCost = m_yChangeCostDynamicFactor + m_yChangeCostStaticFactor;
const int32_t tangentCalc = (-m_xChangeCostDynamicFactor) + m_yChangeCostDynamicFactor;
const int32_t diagonalCostDelta = xStepCost + yStepCost;
if (tangentCalc < 0)
if (diagonalCostDelta < 0)
{
// Diagonal movement will move closer to the edge (first octant)
IncrementY();
@@ -115,9 +115,9 @@ namespace PortabilityLayer
const int32_t xStepCost = -m_xChangeCostDynamicFactor + m_xChangeCostStaticFactor;
const int32_t yStepCost = -m_yChangeCostDynamicFactor + m_yChangeCostStaticFactor;
const int32_t tangentCalc = (-m_xChangeCostDynamicFactor) + (-m_yChangeCostDynamicFactor);
const int32_t diagonalCostDelta = xStepCost + yStepCost;
if (tangentCalc < 0)
if (diagonalCostDelta < 0)
{
// Diagonal movement will move closer to the edge (first octant)
DecrementX();
@@ -157,9 +157,9 @@ namespace PortabilityLayer
const int32_t xStepCost = m_xChangeCostDynamicFactor + m_xChangeCostStaticFactor;
const int32_t yStepCost = -m_yChangeCostDynamicFactor + m_yChangeCostStaticFactor;
const int32_t tangentCalc = (m_xChangeCostDynamicFactor) + (-m_yChangeCostDynamicFactor);
const int32_t diagonalCostDelta = xStepCost + yStepCost;
if (tangentCalc < 0)
if (diagonalCostDelta < 0)
{
// Diagonal movement will move closer to the edge (first octant)
DecrementY();
@@ -199,9 +199,9 @@ namespace PortabilityLayer
const int32_t xStepCost = m_xChangeCostDynamicFactor + m_xChangeCostStaticFactor;
const int32_t yStepCost = m_yChangeCostDynamicFactor + m_yChangeCostStaticFactor;
const int32_t tangentCalc = m_xChangeCostDynamicFactor + m_yChangeCostDynamicFactor;
const int32_t diagonalCostDelta = xStepCost + yStepCost;
if (tangentCalc < 0)
if (diagonalCostDelta < 0)
{
// Diagonal movement will move closer to the edge (first octant)
IncrementX();