X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_curve_func.h;h=fc33402c6f4cac2137b6a2b6074872226e74c773;hb=36d01e1527fda602a9aed07d209eb34e6770bca8;hp=b57888839eeef98a08f41cb51cfe3e3004236be5;hpb=b3016b249333ac0ab0008d8c6c4d9029b2ff30c9;p=synfig.git diff --git a/ETL/trunk/ETL/_curve_func.h b/ETL/trunk/ETL/_curve_func.h index b578888..fc33402 100644 --- a/ETL/trunk/ETL/_curve_func.h +++ b/ETL/trunk/ETL/_curve_func.h @@ -1,7 +1,7 @@ /*! ======================================================================== ** Extended Template and Library ** Utility Curve Template Class Implementations -** $Id: _curve_func.h,v 1.1.1.1 2005/01/04 01:31:47 darco Exp $ +** $Id$ ** ** Copyright (c) 2002 Robert B. Quattlebaum Jr. ** @@ -43,8 +43,8 @@ struct affine_combo T reverse(const T &x, const T &b, const K &t)const { - return T( (x-b*t)*(static_cast(1)/(static_cast(1)-t)) ); - } + return T( (x-t*b)*(static_cast(1)/(static_cast(1)-t)) ); + } }; template @@ -55,10 +55,10 @@ struct distance_func : public std::binary_function T delta=b-a; return static_cast(delta*delta); } - + K cook(const K &x)const { return x*x; } K uncook(const K &x)const { return sqrt(x); } - + }; /* -- E N D ----------------------------------------------------------------- */