Author: Carlos Lopez <[email protected]>
Date: Mon Oct 17 21:11:18 2011 +0200
When calculating the normalised position, use lower boundary as origin.
---
synfig-core/src/synfig/widthpoint.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/synfig-core/src/synfig/widthpoint.cpp
b/synfig-core/src/synfig/widthpoint.cpp
index 436a064..fc3f03c 100644
--- a/synfig-core/src/synfig/widthpoint.cpp
+++ b/synfig-core/src/synfig/widthpoint.cpp
@@ -79,18 +79,18 @@ Real
WidthPoint::get_norm_position(bool wplistloop)const
{
Real pos(get_position());
- Real ret(pos);
+ Real ret(pos-lower_bound_);
Real range(upper_bound_-lower_bound_);
if(wplistloop)
{
- ret=fmod(pos, range);
+ ret=fmod(ret, range);
ret=ret>=0.0?ret:(range+ret);
ret+=lower_bound_;
}
else
{
- if (ret < lower_bound_) ret = lower_bound_;
- if (ret > upper_bound_) ret = upper_bound_;
+ if (pos < lower_bound_) ret = lower_bound_;
+ if (pos > upper_bound_) ret = upper_bound_;
}
// now canonicalize the position to be inside (0.0, 1.0)
ret=(ret-lower_bound_)/range;
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl