[MethodImpl(MethodImplOptions.AggressiveInlining)] private QVector2D CalculateChildCenter(QQuadrant quadrant, QVector2D childHalfRegion) { float xSign = (quadrant.XComponentIsPositive()) ? 1 : -1; float ySign = (quadrant.YComponentIsPositive()) ? 1 : -1; return(new QVector2D( lastPointInserted.x + xSign * childHalfRegion.x, lastPointInserted.y + ySign * childHalfRegion.y )); }
private QVector2D CalculateChildCenter(QQuadrant quadrant, QVector2D childHalfRegion) { float xSign = (quadrant.XComponentIsPositive()) ? 1 : -1; float ySign = (quadrant.YComponentIsPositive()) ? 1 : -1; return(new QVector2D( region.center.x + xSign * childHalfRegion.x, region.center.y + ySign * childHalfRegion.y )); }