KChart

TernaryConstants.cpp
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#include "TernaryConstants.h"
10
11#include <cmath>
12
13using namespace std;
14
15using namespace std;
16
17extern const qreal Sqrt3 = sqrt( 3.0 );
18extern const qreal TriangleWidth = 1.0;
19extern const qreal TriangleHeight = 0.5 * Sqrt3;
20extern const QPointF TriangleTop( 0.5, TriangleHeight );
21extern const QPointF TriangleBottomLeft( 0.0, 0.0 );
22extern const QPointF TriangleBottomRight( 1.0, 0.0 );
23extern const QPointF AxisVector_C_A( TriangleTop - TriangleBottomRight );
24extern const QPointF Norm_C_A( -AxisVector_C_A.y(), AxisVector_C_A.x() );
25extern const QPointF AxisVector_B_A( TriangleTop );
26extern const QPointF Norm_B_A( -AxisVector_B_A.y(), AxisVector_B_A.x() );
27extern const QPointF AxisVector_B_C( TriangleBottomRight );
28extern const QPointF Norm_B_C( -AxisVector_B_C.y(), AxisVector_B_C.x() );
29
30extern const qreal RelMarkerLength = 0.03 * TriangleWidth;
31extern const QPointF FullMarkerDistanceBC( RelMarkerLength * Norm_B_C );
32extern const QPointF FullMarkerDistanceAC( -RelMarkerLength * Norm_C_A );
33extern const QPointF FullMarkerDistanceBA( RelMarkerLength * Norm_B_A );
34
qreal x() const const
qreal y() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.