/[gzz]/gzz/gfx/libutil/Vec23.hxx
ViewVC logotype

Diff of /gzz/gfx/libutil/Vec23.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by benja, Fri Sep 13 11:48:31 2002 UTC revision 1.8 by tjl, Wed Sep 25 14:45:43 2002 UTC
# Line 65  namespace Vec23 { Line 65  namespace Vec23 {
65          T x, y, z;          T x, y, z;
66          Point3() : x(0), y(0), z(0) { }          Point3() : x(0), y(0), z(0) { }
67          Point3(T x, T y, T z) : x(x), y(y), z(z) { }          Point3(T x, T y, T z) : x(x), y(y), z(z) { }
68          Point3(Point<T> &p, T z) : x(p.x), y(p.y), z(z) { }          Point3(Point<T> &p, T z = 0) : x(p.x), y(p.y), z(z) { }
69          Vector3<T> operator-(const Point3 &p) const {          Vector3<T> operator-(const Point3 &p) const {
70                  return Vector3<T>(x - p.x, y - p.y, z - p.z); }                  return Vector3<T>(x - p.x, y - p.y, z - p.z); }
71          Point3<T> operator+(const Vector3<T> v)          Point3<T> operator+(const Vector3<T> v)
# Line 178  namespace Vec23 { Line 178  namespace Vec23 {
178      typedef Vector<float> Vec;      typedef Vector<float> Vec;
179      typedef Vector3<float> ZVec;      typedef Vector3<float> ZVec;
180    
181        template<class X, class Y, class Z> inline float lerp(X a, Y b, Z fract) {
182            return a + fract * (b-a);
183        }
184    
185  }  }
186  #endif  #endif

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26