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

Method getGreen

SRC/renderer/PlainMap.cpp:139–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138
139float
140PlainMap::getGreen(float value) {
141 if (value > max)
142 max = value;
143 else if (value < min)
144 min = value;
145
146 if (maxLast == minLast) {
147 int index = sizeData/2;
148 return data[index*3-2];
149
150 } else if (value > maxLast)
151 return data[sizeData*3-2];
152 else if (value < minLast)
153 return data[1];
154 else {
155 int index = (floor)((value-minLast)*sizeData/((maxLast-minLast)));
156 return data[index*3-2];
157 }
158
159 return 0.0;
160}
161
162float
163PlainMap::getBlue(float value) {

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