MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / getRed

Method getRed

SRC/renderer/PlainMap.cpp:115–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114
115float
116PlainMap::getRed(float value){
117 if (value > max)
118 max = value;
119 else if (value < min)
120 min = value;
121
122 if (maxLast == minLast) {
123 int index = sizeData/2;
124 return data[index*3-3];
125
126 } else if (value > maxLast)
127 return data[sizeData*3-3];
128 else if (value < minLast)
129 return data[0];
130 else {
131 int index = (floor)((value-minLast)*sizeData/((maxLast-minLast)));
132 return data[index*3-3];
133 }
134
135 return 0.0;
136}
137
138
139float

Callers 6

getRGBMethod · 0.95
drawLineMethod · 0.45
drawTriangleMethod · 0.45
drawPointMethod · 0.45
drawLineMethod · 0.45
drawPolygonMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected