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')
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index 4bc738052f6..0279b9a5bdf 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -38,7 +38,10 @@ void BokehImageOperation::initExecution()
this->circularDistance = getWidth()/2;
this->flapRad = (M_PI*2)/this->data->flaps;
this->flapRadAdd = (this->data->angle/360.0)*M_PI*2;
- if (this->flapRadAdd>M_PI) {
+ while (this->flapRadAdd<0.0f) {
+ this->flapRadAdd+=M_PI*2;
+ }
+ while (this->flapRadAdd>M_PI) {
this->flapRadAdd-=M_PI*2;
}
}