KChart

TernaryPoint.h
1/*
2 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3 *
4 * This file is part of the KD Chart library.
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef TERNARYPOINT_H
10#define TERNARYPOINT_H
11
12#include <QtDebug>
13#include <QPointF>
14
15/**
16 * @brief TernaryPoint defines a point within a ternary coordinate plane
17 * \internal
18 */
20{
21public:
23 TernaryPoint( qreal a, qreal b );
24
25 qreal a() const { return m_a; }
26 qreal b() const { return m_b; }
27 qreal c() const { return 1.0 - m_a - m_b; }
28
29 void set( qreal a, qreal b );
30
31 bool isValid() const;
32
33private:
34 qreal m_a;
35 qreal m_b;
36};
37
38QDebug operator<<( QDebug stream, const TernaryPoint& point );
39
40QPointF translate( const TernaryPoint& );
41
42#endif
TernaryPoint defines a point within a ternary coordinate plane.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.