Engauge Digitizer 2
Loading...
Searching...
No Matches
SplinePair.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef SPLINE_PAIR_H
8#define SPLINE_PAIR_H
9
10#include <ostream>
11#include <QDebug>
12
15{
16 public:
18 SplinePair();
19
21 SplinePair (double scalar);
22
24 SplinePair(double x,
25 double y);
26
28 SplinePair &operator=(const SplinePair &other);
29
31 SplinePair(const SplinePair &other);
32
34 SplinePair operator+(const SplinePair &other) const;
35
37 SplinePair operator-(const SplinePair &other) const;
38
40 SplinePair operator*(const SplinePair &other) const;
41
43 SplinePair operator/(const SplinePair &other) const;
44
46 double x() const;
47
49 double y() const;
50
51 private:
52
53 double m_x;
54 double m_y;
55};
56
58std::ostream &operator<< (std::ostream &str, const SplinePair &pair);
59
60QDebug operator<< (QDebug debug, const SplinePair &pair);
61
62#endif // SPLINE_PAIR_H
std::ostream & operator<<(std::ostream &str, const SplinePair &pair)
Insertion operator for qDebug and Logger.
Single X/Y pair for cubic spline interpolation initialization and calculations.
Definition SplinePair.h:15
double y() const
Get method for y.
double x() const
Get method for x.
SplinePair operator-(const SplinePair &other) const
Subtraction operator.
SplinePair()
Default constructor. Normally used only by generic container classes.
SplinePair operator/(const SplinePair &other) const
Division operator.
SplinePair operator*(const SplinePair &other) const
Multiplication operator.
SplinePair operator+(const SplinePair &other) const
Addition operator.
SplinePair & operator=(const SplinePair &other)
Assignment constructor.