From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/math/color.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/math/color.cc') 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); } -- cgit v1.2.3