style cleanup: compositor operations
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "COM_MapValueOperation.h"
|
||||
|
||||
MapValueOperation::MapValueOperation(): NodeOperation()
|
||||
MapValueOperation::MapValueOperation() : NodeOperation()
|
||||
{
|
||||
this->addInputSocket(COM_DT_VALUE);
|
||||
this->addOutputSocket(COM_DT_VALUE);
|
||||
@@ -39,12 +39,12 @@ void MapValueOperation::executePixel(float *outputValue, float x, float y, Pixel
|
||||
float src[4];
|
||||
inputOperation->read(src, x, y, sampler, inputBuffers);
|
||||
TexMapping *texmap = this->settings;
|
||||
float value = (src[0] + texmap->loc[0])*texmap->size[0];
|
||||
float value = (src[0] + texmap->loc[0]) * texmap->size[0];
|
||||
if (texmap->flag & TEXMAP_CLIP_MIN)
|
||||
if (value<texmap->min[0])
|
||||
if (value < texmap->min[0])
|
||||
value = texmap->min[0];
|
||||
if (texmap->flag & TEXMAP_CLIP_MAX)
|
||||
if (value>texmap->max[0])
|
||||
if (value > texmap->max[0])
|
||||
value = texmap->max[0];
|
||||
|
||||
outputValue[0] = value;
|
||||
|
||||
Reference in New Issue
Block a user