Kstars

azimuthalequidistantprojector.cpp
1/*
2 SPDX-FileCopyrightText: 2010 Henry de Valence <hdevalence@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifdef _WIN32
8#include <windows.h>
9#endif
10
11#include "azimuthalequidistantprojector.h"
12
13AzimuthalEquidistantProjector::AzimuthalEquidistantProjector(const ViewParams &p) : Projector(p)
14{
15 updateClipPoly();
16}
17
18Projector::Projection AzimuthalEquidistantProjector::type() const
19{
20 return AzimuthalEquidistant;
21}
22
24{
25 return 1.57079633;
26}
27
29{
30 double crad = acos(x);
31 return ((crad != 0) ? crad / sin(crad) : 1); // This handles the 0/0 case. The limit of x / sin(x) is 1 as x -> 0.
32}
33
35{
36 return x;
37}
double radius() const override
Get the radius of this projection's sky circle.
double projectionL(double x) const override
This function handles some of the projection-specific code.
double projectionK(double x) const override
This function handles some of the projection-specific code.
Projection type() const override
Return the type of this projection.
The Projector class is the primary class that serves as an interface to handle projections.
Definition projector.h:58
This is just a container that holds information needed to do projections.
Definition projector.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.