KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
TernaryPoint.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Chart library.
4**
5** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef TERNARYPOINT_H
12#define TERNARYPOINT_H
13
14#include <QPointF>
15#include <QtDebug>
16
22{
23public:
25 TernaryPoint(qreal a, qreal b);
26
27 qreal a() const
28 {
29 return m_a;
30 }
31 qreal b() const
32 {
33 return m_b;
34 }
35 qreal c() const
36 {
37 return 1.0 - m_a - m_b;
38 }
39
40 void set(qreal a, qreal b);
41
42 bool isValid() const;
43
44private:
45 qreal m_a = -1.0;
46 qreal m_b = -1.0;
47};
48
49QDebug operator<<(QDebug stream, const TernaryPoint &point);
50
52
53#endif
QPointF translate(const TernaryPoint &)
QDebug operator<<(QDebug stream, const TernaryPoint &point)
TernaryPoint defines a point within a ternary coordinate plane.
void set(qreal a, qreal b)
qreal a() const
qreal b() const
bool isValid() const
qreal c() const

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8