~ubuntu-branches/ubuntu/oneiric/nux/oneiric

« back to all changes in this revision

Viewing changes to NuxCore/Math/Point2D.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-06-22 17:16:16 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20110622171616-3cyhhiwsb6ga9d30
Tags: 1.0.2-0ubuntu1
* New upstream release.
* Cherry-pick a fix for FTBFS with -fpermissive
* debian/control:
  - add new libxdamage-dev and libxcomposite-dev build-dep
  - add new libboost1.42-dev dep as well, should be transitionned to 1.46 once
    compiz is transitionned as well
* remove debian/patches/01_build_with_gcc46.patch as included upstream
* debian/rules:
  - disable google code tests while building
* debian/control, debian/rules, debian/libnux-1.0-common.install,
  debian/libnux-1.0-dev.install, debian/libnux-1.0-doc.install,
  debian/libnux-1.0-0.install:
  - change, prepare next ABI breakage and remove no more needed Breaks: with
    new soname bump
* libnux-1.0-common now replaces: libnux-0.9-common for the apport hook

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
  {
32
32
  public:
33
33
    Point2D();
34
 
    ~Point2D();
35
 
    Point2D (const Point2D &Pt);
36
 
    Point2D (T x, T y);
37
 
 
38
 
    bool operator == (const Point2D<T>& Pt) const;
39
 
    bool operator != (const Point2D<T>& Pt) const;
40
 
 
41
 
    void Set (T x, T y);
 
34
    Point2D(T const& x, T const& y);
42
35
 
43
36
    T x, y;
44
37
  };
45
38
 
46
39
  template<typename T>
47
 
  Point2D<T>::Point2D()
48
 
  {
49
 
    x = 0;
50
 
    y = 0;
51
 
  }
52
 
 
53
 
  template<typename T>
54
 
  Point2D<T>::~Point2D()
55
 
  {
56
 
  }
57
 
 
58
 
  template<typename T>
59
 
  Point2D<T>::Point2D (const Point2D &Pt)
60
 
  {
61
 
    x = Pt.x;
62
 
    y = Pt.y;
63
 
  }
64
 
 
65
 
  template<typename T>
66
 
  Point2D<T>::Point2D (T X, T Y)
67
 
  {
68
 
    x = X;
69
 
    y = Y;
70
 
  }
71
 
 
72
 
  template<typename T>
73
 
  void Point2D<T>::Set (T X, T Y)
74
 
  {
75
 
    x = X;
76
 
    y = Y;
77
 
  }
78
 
 
79
 
  template<typename T>
80
 
  bool Point2D<T>::operator == (const Point2D &Pt) const
81
 
  {
82
 
    if ( (x == Pt.x) && (y == Pt.y) )
83
 
    {
84
 
      return true;
85
 
    }
86
 
    else
87
 
    {
88
 
      return false;
89
 
    }
90
 
  }
91
 
 
92
 
  template<typename T>
93
 
  bool Point2D<T>::operator != (const Point2D &Pt) const
94
 
  {
95
 
    return ! ( (*this) == Pt);
96
 
  }
97
 
 
 
40
  bool operator ==(const Point2D<T>& lhs, const Point2D<T>& rhs);
 
41
 
 
42
  template<typename T>
 
43
  bool operator !=(const Point2D<T>& lhs, const Point2D<T>& rhs);
 
44
 
 
45
  // Do we want to keep this really?
98
46
  typedef Point2D<float> Point2;
99
47
 
100
48
}
101
49
 
 
50
#include "Point2D-inl.h"
 
51
 
102
52
#endif // POINT2D_H