[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kstars/hdevalence-gsoc2013] kstars/engine: Add degrees/radians conversion factors.
From: Henry de Valence <hdevalence () hdevalence ! ca>
Date: 2013-06-24 18:15:38
Message-ID: E1UrBIg-0003Yh-BB () scm ! kde ! org
[Download RAW message or body]
Git commit e159896e3ef03eaa7b6c4fef09553551596e7dc4 by Henry de Valence.
Committed on 21/06/2013 at 09:54.
Pushed by hdevalence into branch 'hdevalence-gsoc2013'.
Add degrees/radians conversion factors.
These already exist in the dms class, but I don't think that they
really belong there. Various engine code should probably be avoiding
that class, and there's no reason to use dms just for that conversion
factor.
M +5 -0 kstars/engine/types.h
http://commits.kde.org/kstars/e159896e3ef03eaa7b6c4fef09553551596e7dc4
diff --git a/kstars/engine/types.h b/kstars/engine/types.h
index d48aef9..8b59382 100644
--- a/kstars/engine/types.h
+++ b/kstars/engine/types.h
@@ -97,6 +97,11 @@ typedef double Radian;
/// Number of kilometers in one AU
static const double AU_KM = 1.49605e8;
+/// Degrees to radians conversion
+static const double DEG2RAD = M_PI/180.;
+/// Radians to degrees conversion
+static const double RAD2DEG = 180./M_PI;
+
} // NS KSEngine
#endif //KSENGINE_TYPES_H
\ No newline at end of file
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic