1
0
Fork 0

For property-scale, apply the squared option before factor, etc.

This commit is contained in:
david 2002-03-02 19:40:26 +00:00
parent 00738f22f7
commit 0296c04e32

View file

@ -543,9 +543,9 @@ do_property_scale (const SGPropertyNode * arg, SGCommandState ** state)
bool squared =
((PropertyCommandState *)(*state))->getSquared()->getBoolValue();
double result = (setting + offset) * factor;
if (squared)
result = (result < 0 ? -1 : 1) * result * result;
setting = (setting < 0 ? -1 : 1) * setting * setting;
double result = (setting + offset) * factor;
return prop->setDoubleValue(result);
}