Remove .gitignore do nothing is ignored.
[synfig.git] / ETL / trunk / ETL / _curve_func.h
index b1be012..b2898aa 100644 (file)
@@ -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.
 **
 template <class T, class K=float>
 struct affine_combo
 {
+       // from (a) to (x) : x = a(1-t) + b(t)
        T operator()(const T &a,const T &b,const K &t)const
        {
                return T( (b-a)*t+a );
        }
 
+       // from (x) to (a) : a = (x-b(t)) / (1-t)
        T reverse(const T &x, const T &b, const K &t)const
        {
                return T( (x-t*b)*(static_cast<K>(1)/(static_cast<K>(1)-t)) );
-       }       
+       }
 };
 
 template <class T, class K=float>
@@ -55,10 +57,10 @@ struct distance_func : public std::binary_function<T, T, K>
                T delta=b-a;
                return static_cast<K>(delta*delta);
        }
-       
+
        K cook(const K &x)const { return x*x; }
        K uncook(const K &x)const { return sqrt(x); }
-       
+
 };
 
 /* -- E N D ----------------------------------------------------------------- */