An update will be applied January 25th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit cc2c7047 authored by Will Schroeder's avatar Will Schroeder
Browse files

ERR: Fixed range bug.

parent c155b9c8
...@@ -52,8 +52,7 @@ int vlLookupTable::Allocate(int sz, int ext) ...@@ -52,8 +52,7 @@ int vlLookupTable::Allocate(int sz, int ext)
// range value. // range value.
void vlLookupTable::SetTableRange(float r[2]) void vlLookupTable::SetTableRange(float r[2])
{ {
this->TableRange[0] = r[0]; this->SetTableRange(r[0],r[1]);
this->TableRange[1] = r[1];
} }
// Description: // Description:
...@@ -63,12 +62,18 @@ void vlLookupTable::SetTableRange(float r[2]) ...@@ -63,12 +62,18 @@ void vlLookupTable::SetTableRange(float r[2])
// range value. // range value.
void vlLookupTable::SetTableRange(float min, float max) void vlLookupTable::SetTableRange(float min, float max)
{ {
if ( min >= max )
{
vlErrorMacro (<<"Bad table range");
return;
}
this->TableRange[0] = min; this->TableRange[0] = min;
this->TableRange[1] = max; this->TableRange[1] = max;
} }
// Description: // Description:
// Generate lookup table from object parameters. // Generate lookup table from hue, saturation, and value min/max values.
void vlLookupTable::Build() void vlLookupTable::Build()
{ {
int i, hueCase; int i, hueCase;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment