Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_WrapOperation.cc
| Show All 27 Lines | |||||
| } | } | ||||
| inline float WrapOperation::getWrappedOriginalXPos(float x) | inline float WrapOperation::getWrappedOriginalXPos(float x) | ||||
| { | { | ||||
| if (this->getWidth() == 0) { | if (this->getWidth() == 0) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| while (x < 0) { | while (x < 0) { | ||||
| x += this->m_width; | x += this->getWidth(); | ||||
| } | } | ||||
| return fmodf(x, this->getWidth()); | return fmodf(x, this->getWidth()); | ||||
| } | } | ||||
| inline float WrapOperation::getWrappedOriginalYPos(float y) | inline float WrapOperation::getWrappedOriginalYPos(float y) | ||||
| { | { | ||||
| if (this->getHeight() == 0) { | if (this->getHeight() == 0) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| while (y < 0) { | while (y < 0) { | ||||
| y += this->m_height; | y += this->getHeight(); | ||||
| } | } | ||||
| return fmodf(y, this->getHeight()); | return fmodf(y, this->getHeight()); | ||||
| } | } | ||||
| void WrapOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) | void WrapOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) | ||||
| { | { | ||||
| float nx, ny; | float nx, ny; | ||||
| nx = x; | nx = x; | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||