diff options
author | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
commit | f030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch) | |
tree | cd92baf9e4fa8a136523b9eb570e9811846c9250 /src/math/color.cc | |
parent | 5636fad174f0bcff857c357c394c4cc8d424b302 (diff) |
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/math/color.cc')
-rw-r--r-- | src/math/color.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/math/color.cc b/src/math/color.cc index ff4cb5d..b807b96 100644 --- a/src/math/color.cc +++ b/src/math/color.cc @@ -75,21 +75,21 @@ const Color & Color::operator=(Color const & other) void Color::clamp() { - for (int i =0; i < 4; i++) + for (int i = 0; i < 4; i++) if (rgba_data[i] < 0) rgba_data[i] = 0; - + float tmp = rgba_data[0]; if (rgba_data[1] > tmp) tmp = rgba_data[1]; if (rgba_data[2] > tmp) tmp = rgba_data[2]; - + if (tmp > 1) { - for (int i =0; i < 3; i++) + for (int i = 0; i < 3; i++) rgba_data[i] /= tmp; } - + if (rgba_data[3] > 1) rgba_data[3] = 1; } @@ -126,7 +126,7 @@ Color const operator*(float scalar, Color const & color) Color & Color::operator*=(const float scalar) { - for (int i=0; i < 3; i++) + for (int i = 0; i < 3; i++) rgba_data[i] *= scalar; return (*this); } |