style cleanup

This commit is contained in:
Campbell Barton
2013-01-31 21:15:38 +00:00
parent 64c6736ef2
commit a9015e3f7d
3 changed files with 35 additions and 25 deletions

View File

@@ -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());