diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:51:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:55:15 +0300 |
commit | d8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch) | |
tree | 0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/freestyle/intern/system/PseudoNoise.cpp | |
parent | 8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff) |
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/freestyle/intern/system/PseudoNoise.cpp')
-rw-r--r-- | source/blender/freestyle/intern/system/PseudoNoise.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/system/PseudoNoise.cpp b/source/blender/freestyle/intern/system/PseudoNoise.cpp index 877cdee0814..048be5d018c 100644 --- a/source/blender/freestyle/intern/system/PseudoNoise.cpp +++ b/source/blender/freestyle/intern/system/PseudoNoise.cpp @@ -49,8 +49,9 @@ PseudoNoise::PseudoNoise() void PseudoNoise::init(long seed) { RandGen::srand48(seed); - for (unsigned int i = 0; i < NB_VALUE_NOISE; i++) + for (unsigned int i = 0; i < NB_VALUE_NOISE; i++) { _values[i] = -1.0 + 2.0 * RandGen::drand48(); + } } real PseudoNoise::linearNoise(real x) @@ -64,10 +65,12 @@ real PseudoNoise::linearNoise(real x) static real LanczosWindowed(real t) { - if (fabs(t) > 2) + if (fabs(t) > 2) { return 0; - if (fabs(t) < M_EPSILON) + } + if (fabs(t) < M_EPSILON) { return 1.0; + } return sin(M_PI * t) / (M_PI * t) * sin(M_PI * t / 2.0) / (M_PI * t / 2.0); } |