#include <cmath>#include <stdlib.h>Include dependency graph for mathlib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | PI 3.14159265358979323846 |
Typedefs | |
| typedef Math< double > | Mathd |
| typedef Math< float > | Mathf |
Functions | |
| template<class T> | |
| T | abs (T x) |
| template<class T> | |
| T | circleArea (T r) |
| template<class T> | |
| T | clamp (T x) |
| template<class T> | |
| T | cube (T x) |
| template<class T> | |
| T | degToRad (T d) |
| template<class T> | |
| T | pfmod (T x, T y) |
| template<class T> | |
| T | radToDeg (T r) |
| template<class T> | |
| T | sign (T x) |
| template<class T> | |
| T | sphereArea (T r) |
| template<class T> | |
| T | square (T x) |
|
|
|
|
|
|
|
|
||||||||||
|
||||||||||
|
Definition at line 93 of file mathlib.h. References PI. Referenced by Body::getLuminosity(). 00094 {
00095 return (T) PI * r * r;
00096 }
|
|
||||||||||
|
Definition at line 62 of file mathlib.h. Referenced by Color::Color(), StarRenderer::process(), Renderer::renderBodyAsParticle(), Renderer::renderEllipsoidAtmosphere(), Galaxy::renderGalaxyPointSprites(), Renderer::renderObject(), CelestiaCore::renderOverlay(), and Observer::update(). 00063 {
00064 if (x < 0)
00065 return 0;
00066 else if (x > 1)
00067 return 1;
00068 else
00069 return x;
00070 }
|
|
||||||||||
|
Definition at line 57 of file mathlib.h. Referenced by IapetusOrbit::computePosition(), and StateVectorToOrbit().
|
|
||||||||||
|
||||||||||||||||
|
Definition at line 84 of file mathlib.h. References abs(). Referenced by auxJSun(), computePlanetCoords(), computePlanetElements(), CallistoOrbit::computePosition(), GanymedeOrbit::computePosition(), EuropaOrbit::computePosition(), IoOrbit::computePosition(), NeptuneOrbit::computePosition(), UranusOrbit::computePosition(), LunarOrbit::computePosition(), EarthOrbit::computePosition(), EclipticToEquatorial(), and Renderer::renderObject(). 00085 {
00086 int quotient = (int) abs(x / y);
00087 if (x < 0.0)
00088 return x + (quotient + 1) * y;
00089 else
00090 return x - quotient * y;
00091 }
|
|
||||||||||
|
Definition at line 42 of file mathlib.h. References PI. Referenced by computePlanetCoords(), TitanOrbit::computePosition(), RheaOrbit::computePosition(), displayApparentDiameter(), displayLocationInfo(), Observer::getSelectionLongLat(), CelestiaCore::mouseMove(), OuterSaturnMoonParams(), Renderer::render(), CelestiaCore::renderOverlay(), showSelectionInfo(), StateVectorToOrbit(), and Url::Url().
|
|
||||||||||
|
Definition at line 72 of file mathlib.h. Referenced by BigFix::BigFix(), CelestiaCore::deleteView(), EllipticalOrbit::eccentricAnomaly(), CelestiaCore::joystickAxis(), celx::Scanner::nextToken(), Tokenizer::nextToken(), SolveKeplerLaguerreConwayHyp::operator()(), SolveKeplerLaguerreConway::operator()(), CelestiaCore::renderOverlay(), StarBrowserCompareFunc(), View::walkTreeResize(), and View::walkTreeResizeDelta(). 00073 {
00074 if (x < 0)
00075 return -1;
00076 else if (x > 0)
00077 return 1;
00078 else
00079 return 0;
00080 }
|
|
||||||||||
|
Definition at line 98 of file mathlib.h. References PI. Referenced by Body::getLuminosity().
|
|
||||||||||
1.4.1