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
14{
15 public:
17 SplinePair();
18
20 SplinePair (double scalar);
21
23 SplinePair(double x,
24 double y);
25
27 SplinePair &operator=(const SplinePair &other);
28
30 SplinePair(const SplinePair &other);
31
33 SplinePair operator+(const SplinePair &other) const;
34
36 SplinePair operator-(const SplinePair &other) const;
37
39 SplinePair operator*(const SplinePair &other) const;
40
42 SplinePair operator/(const SplinePair &other) const;
43
45 double x() const;
46
48 double y() const;
49
50 private:
51
52 double m_x;
53 double m_y;
54};
55
57std::ostream &operator<< (std::ostream &str, const SplinePair &pair);
58
59#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:14
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.