style cleanup
This commit is contained in:
@@ -132,17 +132,22 @@ float TranslateOperation::getWrappedOriginalXPos(float x)
|
||||
|
||||
// Positive offset: Append image data from the left
|
||||
if (this->m_relativeOffsetX > 0) {
|
||||
if ( x < this->m_relativeOffsetX )
|
||||
if (x < this->m_relativeOffsetX) {
|
||||
originalXPos = this->getWidth() - this->m_relativeOffsetX + x;
|
||||
else
|
||||
}
|
||||
else {
|
||||
originalXPos = x - this->m_relativeOffsetX;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Negative offset: Append image data from the right
|
||||
if (x < (this->getWidth() + this->m_relativeOffsetX))
|
||||
if (x < (this->getWidth() + this->m_relativeOffsetX)) {
|
||||
originalXPos = x - this->m_relativeOffsetX;
|
||||
else
|
||||
}
|
||||
else {
|
||||
originalXPos = x - (this->getWidth() + this->m_relativeOffsetX);
|
||||
}
|
||||
}
|
||||
|
||||
while (originalXPos < 0) originalXPos += this->m_width;
|
||||
return fmodf(originalXPos, this->getWidth());
|
||||
@@ -155,17 +160,22 @@ float TranslateOperation::getWrappedOriginalYPos(float y)
|
||||
|
||||
// Positive offset: Append image data from the bottom
|
||||
if (this->m_relativeOffsetY > 0) {
|
||||
if ( y < this->m_relativeOffsetY )
|
||||
if (y < this->m_relativeOffsetY) {
|
||||
originalYPos = this->getHeight() - this->m_relativeOffsetY + y;
|
||||
else
|
||||
}
|
||||
else {
|
||||
originalYPos = y - this->m_relativeOffsetY;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Negative offset: Append image data from the top
|
||||
if (y < (this->getHeight() + this->m_relativeOffsetY))
|
||||
if (y < (this->getHeight() + this->m_relativeOffsetY)) {
|
||||
originalYPos = y - this->m_relativeOffsetY;
|
||||
else
|
||||
}
|
||||
else {
|
||||
originalYPos = y - (this->getHeight() + this->m_relativeOffsetY);
|
||||
}
|
||||
}
|
||||
|
||||
while (originalYPos < 0) originalYPos += this->m_height;
|
||||
return fmodf(originalYPos, this->getHeight());
|
||||
|
Reference in New Issue
Block a user