Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_WrapOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp
index e55f63f7d73..cb119fb4f1d 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cpp
+++ b/source/blender/compositor/operations/COM_WrapOperation.cpp
@@ -25,19 +25,23 @@ WrapOperation::WrapOperation(DataType datatype) : ReadBufferOperation(datatype)
inline float WrapOperation::getWrappedOriginalXPos(float x)
{
- if (this->getWidth() == 0)
+ if (this->getWidth() == 0) {
return 0;
- while (x < 0)
+ }
+ while (x < 0) {
x += this->m_width;
+ }
return fmodf(x, this->getWidth());
}
inline float WrapOperation::getWrappedOriginalYPos(float y)
{
- if (this->getHeight() == 0)
+ if (this->getHeight() == 0) {
return 0;
- while (y < 0)
+ }
+ while (y < 0) {
y += this->m_height;
+ }
return fmodf(y, this->getHeight());
}