source:
issm/oecreview/Archive/19101-20495/ISSM-19807-19808.diff@
20498
Last change on this file since 20498 was 20498, checked in by , 9 years ago | |
---|---|
File size: 690 bytes |
-
../trunk-jpl/src/m/plot/webgl.js
116 116 return modelMatrix; 117 117 } //}}} 118 118 function rgb(value, min, max) { //{{{ 119 120 var normalizedValue; 119 121 120 122 colorbar=colorbars["rainbow"]; 121 123 122 124 value = clamp(value, min, max); 123 var normalizedValue = (value - min) / (max - min); 125 if((max-min)!=0) normalizedValue = (value - min) / (max - min); 126 else normalizedValue = value; 127 124 128 var index = clamp(Math.round(normalizedValue * colorbar.length), 0, colorbar.length - 1); 125 129 return colorbar[index]; 126 130 } //}}}
Note:
See TracBrowser
for help on using the repository browser.