Kstars

azimuthalequidistantprojector.cpp
1 /*
2  SPDX-FileCopyrightText: 2010 Henry de Valence <[email protected]>
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 
13 AzimuthalEquidistantProjector::AzimuthalEquidistantProjector(const ViewParams &p) : Projector(p)
14 {
15  updateClipPoly();
16 }
17 
18 Projector::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 projectionK(double x) const override
This function handles some of the projection-specific code.
double projectionL(double x) const override
This function handles some of the projection-specific code.
This is just a container that holds information needed to do projections.
Definition: projector.h:36
Projection type() const override
Return the type of this projection.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:02:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.