X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_bline.cpp;h=a8f179856d9904353945fc894a990422661bd28c;hb=6f8559ddcb82636029d07776700d51b0e0c35e92;hp=82e5a429fc0870d5798c0e559396ea902998b984;hpb=37600b4b217caa5e316984ec0b035c5e8f9698af;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_bline.cpp b/synfig-core/trunk/src/synfig/valuenode_bline.cpp index 82e5a42..a8f1798 100644 --- a/synfig-core/trunk/src/synfig/valuenode_bline.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_bline.cpp @@ -1,6 +1,6 @@ /* === S Y N F I G ========================================================= */ /*! \file valuenode_bline.cpp -** \brief Template File +** \brief Implementation of the "BLine" valuenode conversion. ** ** $Id$ ** @@ -53,6 +53,8 @@ using namespace synfig; /* === M A C R O S ========================================================= */ +#define EPSILON 0.0000001f + /* === G L O B A L S ======================================================= */ /* === P R O C E D U R E S ================================================= */ @@ -351,7 +353,7 @@ ValueNode_BLine::operator()(Time t)const assert(amount<=1.0f); // it's fully on - if(amount==1.0f) + if (amount > 1.0f - EPSILON) { if(first_flag) { @@ -423,7 +425,7 @@ ValueNode_BLine::operator()(Time t)const // Find "end" of dynamic group - ie. search forward along // the bline from the current point until we find a point - // which is more 'on'than the current one + // which is more 'on' than the current one end_iter=iter; // for(++end_iter;begin_iter!=list.end();++end_iter) for(++end_iter;end_iter!=list.end();++end_iter) @@ -570,7 +572,7 @@ ValueNode_BLine::operator()(Time t)const curr_coord_sys[0]=(begin_pos_at_current_time - end_pos_at_current_time).norm(); curr_coord_sys[1]=curr_coord_sys[0].perp(); - // Invert (transpose) the last of these matricies, since we use it for transform back + // Invert (transpose) the last of these matrices, since we use it for transform back swap(curr_coord_sys[0][1],curr_coord_sys[1][0]); } @@ -692,7 +694,8 @@ ValueNode_BLine::operator()(Time t)const String ValueNode_BLine::link_local_name(int i)const { - assert(i>=0 && (unsigned)i=0 && i