Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/math/color.cc
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/math/color.cc')
-rw-r--r--src/math/color.cc12
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);
}