Commit 8a21604c authored by Dirk Wilden's avatar Dirk Wilden

comments

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6275 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 50612703
...@@ -695,13 +695,13 @@ void TextureControlPlugin::computeValue(Texture& _texture, double _min, double _ ...@@ -695,13 +695,13 @@ void TextureControlPlugin::computeValue(Texture& _texture, double _min, double _
if ( ! repeat ) { if ( ! repeat ) {
if (! center ) { if (! center ) {
if ( scale) { if ( scale) {
_value /= scaleFactor; _value /= scaleFactor; //scaleFactor is != 0.0 (otherwise _min==_max)
_value -= _min/scaleFactor; _value -= _min/scaleFactor;
} }
} else { } else {
// the values above zero are mapped to 0.5..1 the negative ones to 0.5..0 // the values above zero are mapped to 0.5..1 the negative ones to 0.5..0
if (_value > 0.0) { if (_value > 0.0) {
_value /= ( _max * 2.0); _value /= ( _max * 2.0); //_max >= _value > 0.0
_value += 0.5; _value += 0.5;
} else { } else {
if ( _min == 0.0 ){ if ( _min == 0.0 ){
......
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