Changeset 449:4ff868864e9b

Show
Ignore:
Timestamp:
01/08/2013 02:06:49 PM (5 months ago)
Author:
Andreas Schaefer <gentryx@…>
Branch:
default
Message:

coding style

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/examples/jacobi2d/main.cpp

    r447 r449  
    2727    } 
    2828 
    29     inline Cell(const double& v=0) : temp(v) 
     29    inline Cell(const double& v = 0) :  
     30        temp(v) 
    3031    {}   
    3132 
     
    5859            for (int x = 0; x < 250; ++x) { 
    5960                Coord<2> c(x + offsetX, y + offsetY); 
    60                 if (rect.inBounds(c)) 
     61                if (rect.inBounds(c)) { 
    6162                    ret->at(c) = Cell(0.99999999999); 
     63                } 
    6264            } 
    6365        } 
     
    6971    Color operator()(const Cell& cell) 
    7072    { 
    71         if (cell.temp < 0) 
     73        if (cell.temp < 0) { 
    7274            return Color(0, 0, 0); 
    73         if (cell.temp < 0.25) 
     75        } 
     76        if (cell.temp < 0.25) { 
    7477            return Color(0, (cell.temp - 0.0) * 1020, 255); 
    75         if (cell.temp < 0.50) 
     78        } 
     79        if (cell.temp < 0.50) { 
    7680            return Color(0, 255, 255 - (cell.temp - 0.25) * 1020); 
    77         if (cell.temp < 0.75) 
     81        } 
     82        if (cell.temp < 0.75) { 
    7883            return Color((cell.temp - 0.5) * 1020, 255, 0); 
    79         if (cell.temp < 1.00) 
     84        } 
     85        if (cell.temp < 1.00) { 
    8086            return Color(255, 255 - (cell.temp - 0.75) * 1020, 0); 
     87        } 
    8188        return Color(255, 255, 255); 
    8289    }