kstars
#include <dms.h>
Public Member Functions | |
dms () | |
dms (const int &d, const int &m=0, const int &s=0, const int &ms=0) | |
dms (const double &x) | |
dms (const QString &s, bool isDeg=true) | |
int | arcmin () const |
int | arcsec () const |
int | degree () const |
const double & | Degrees () const |
int | hour () const |
double | Hours () const |
int | marcsec () const |
int | minute () const |
int | msecond () const |
int | second () const |
void | setD (const double &x) |
Detailed Description
An angle, stored as degrees, but expressible in many ways.
- Version
- 1.0
dms encapsulates an angle. The angle is stored as a double, equal to the value of the angle in degrees. Methods are available for setting/getting the angle as a floating-point measured in Degrees or Hours, or as integer triplets (degrees, arcminutes, arcseconds or hours, minutes, seconds). There is also a method to set the angle according to a radian value, and to return the angle expressed in radians. Finally, a SinCos() method computes the sin and cosine of the angle.
Constructor & Destructor Documentation
|
inlineexplicit |
Set the floating-point value of the angle according to the four integer arguments.
- Parameters
-
d degree portion of angle (int). Defaults to zero. m arcminute portion of angle (int). Defaults to zero. s arcsecond portion of angle (int). Defaults to zero. ms arcsecond portion of angle (int). Defaults to zero.
|
inlineexplicit |
|
inlineexplicit |
Construct an angle from a string representation.
Attempt to create the angle according to the string argument. If the string cannot be parsed as an angle value, the angle is set to zero.
- Warning
- There is not an unambiguous notification that it failed to parse the string, since the string could have been a valid representation of zero degrees. If this is a concern, use the setFromString() function directly instead.
- Parameters
-
s the string to parse as a dms value. isDeg if true, value is in degrees; if false, value is in hours.
- See also
- setFromString()
Member Function Documentation
int dms::arcmin | ( | void | ) | const |
int dms::arcsec | ( | void | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
int dms::marcsec | ( | void | ) | const |
int dms::minute | ( | void | ) | const |
int dms::msecond | ( | void | ) | const |
int dms::second | ( | void | ) | const |
|
inline |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.