point2d.h
Go to the documentation of this file.
1 
9 #pragma once
10 #include <limits>
12 
13 namespace illumina { namespace interop { namespace model { namespace metrics
14 {
22  class point2d
23  {
24  public:
26  point2d() : m_x(std::numeric_limits<float>::quiet_NaN()), m_y(std::numeric_limits<float>::quiet_NaN())
27  {
28  }
29 
35  point2d(const float x, const float y) : m_x(x), m_y(y)
36  {
37  }
38 
39  public:
44  point2d(const point2d &val) : m_x(val.m_x), m_y(val.m_y)
45  {
46  }
52  point2d &operator=(const point2d &val)
53  {
54  m_x = val.m_x;
55  m_y = val.m_y;
56  return *this;
57  }
58 
59  public:
64  float x() const
65  {
66  return m_x;
67  }
68 
73  float y() const
74  {
75  return m_y;
76  }
81  size_t size_in_bytes()const
82  {
83  return sizeof(m_x)+ sizeof(m_y);
84  }
85 
86  private:
87  float m_x;
88  float m_y;
89  template<class MetricType, int Version>
90  friend
91  struct io::generic_layout;
92  };
93 }}}}
Definition: enum_description.h:15
float x() const
Definition: point2d.h:64
point2d & operator=(const point2d &val)
Definition: point2d.h:52
Definition: generic_layout.h:24
point2d(const float x, const float y)
Definition: point2d.h:35
point2d(const point2d &val)
Definition: point2d.h:44
float y() const
Definition: point2d.h:73
size_t size_in_bytes() const
Definition: point2d.h:81