ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtutil.h
(Generate patch)

Comparing rxvt-unicode/src/rxvtutil.h (file contents):
Revision 1.62 by sf-exg, Wed Nov 12 12:12:02 2014 UTC vs.
Revision 1.63 by root, Sun Dec 14 04:52:10 2014 UTC

21template<typename T, typename U> static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; } 21template<typename T, typename U> static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; }
22template<typename T, typename U> static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; } 22template<typename T, typename U> static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; }
23 23
24template<typename T, typename U, typename V> static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; } 24template<typename T, typename U, typename V> static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; }
25template<typename T, typename U, typename V> static inline void clamp_it (T &v, U a, V b) { v = v < (T)a ? a : v >(T)b ? b : v; } 25template<typename T, typename U, typename V> static inline void clamp_it (T &v, U a, V b) { v = v < (T)a ? a : v >(T)b ? b : v; }
26
27template<typename T> static inline T squared_diff (T a, T b) { return (a - b) * (a - b); }
28 26
29// linear interpolation 27// linear interpolation
30template<typename T, typename U, typename P> 28template<typename T, typename U, typename P>
31static inline T 29static inline T
32lerp (T a, U b, P p) 30lerp (T a, U b, P p)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines