int ny = GetDocument()->ny();
#if 1
- static float position0[] = {nx/2, ny*2, -ny*2, 0.0f,};
+ static float position0[] = {nx/2.0f, ny*2.0f, -ny*2.0f, 0.0f,};
static float ambient0[] = {.1f, .1f, .1f, 1.0f};
static float diffuse0[] = {1.0f, 1.0f, 1.0f, 1.0f};
- static float position1[] = {-nx/2, -ny*2, -ny*2, 0.0f,};
+ static float position1[] = {-nx/2.0f, -ny*2.0f, -ny*2.0f, 0.0f,};
static float ambient1[] = {.1f, .1f, .1f, .1f};
static float diffuse1[] = {1.0f, 1.0f, 1.0f, 1.0f};
// static float position0[] = {0.0f, 0.0f, 20.0f, 0.0f};
if (v != NULL && nx != 0 && ny != 0) {
double min = v[0][0];
double max = min;
- for (unsigned int ix = 0; ix < nx; ix++)
+ for (unsigned int ix = 0; ix < nx; ix++) {
for (unsigned int iy = 0; iy < ny; iy++) {
double dVal = v[ix][iy];
if (min > dVal)
else if (max < dVal)
max = dVal;
}
- m_dGraphMin = min;
- m_dGraphMax = max;
- if (! m_bColorScaleMinSet)
- m_dColorScaleMin = min;
- if (! m_bColorScaleMaxSet)
- m_dColorScaleMax = max;
+ }
+ m_dGraphMin = min;
+ m_dGraphMax = max;
+ if (! m_bColorScaleMinSet)
+ m_dColorScaleMin = min;
+ if (! m_bColorScaleMaxSet)
+ m_dColorScaleMax = max;
}
double dRadius = maxValue<int> (nx, ny) * SQRT2 / 2;