38 double d2 = v(0) * v(0) + v(1) * v(1);
43 lat = ::copysign(0.5 *
PI, lat);
50 double d2 = v(0) * v(0) + v(1) * v(1);
73 void LonLat::_enforceInvariants() {
77 }
else if (_lat.
isNan()) {
83 return os <<
'[' << p.
getLon() <<
", " << p.
getLat() <<
']';
NormalizedAngle is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle ca...
bool isNan() const
isNan returns true if the angle value is NaN.
std::ostream & operator<<(std::ostream &, Angle const &)
Vector3d is a vector in ℝ³ with components stored in double precision.
static NormalizedAngle longitudeOf(Vector3d const &v)
longitudeOf returns the longitude of the point on the unit sphere corresponding to the direction of v...
NormalizedAngle getLon() const
This file declares a class for representing vectors in ℝ³.
bool isNan() const
isNan returns true if the angle value is NaN.
A base class for image defects.
double asRadians() const
asRadians returns the value of this angle in units of radians.
static Angle latitudeOf(Vector3d const &v)
latitudeOf returns the latitude of the point on the unit sphere corresponding to the direction of v...
static NormalizedAngle nan()
Angle represents an angle in radians.
LonLat represents a spherical coordinate (longitude/latitude angle) pair.
LonLat()
This constructor creates the point with longitude and latitude angle equal to zero.
This file contains a class representing spherical coordinates.