54 v.
x() * v.
x() + v.
y() * v.
y());
57 u._v =
Vector3d(-::copysign(1.0, v.
z()), 0.0, 0.0);
64 double sinLon =
sin(lon);
65 double cosLon =
cos(lon);
66 double sinLat =
sin(lat);
67 double cosLat =
cos(lat);
74 return os << static_cast<Vector3d const &>(v);
static UnitVector3d orthogonalTo(Vector3d const &v)
orthogonalTo returns an arbitrary unit vector that is orthogonal to v.
std::ostream & operator<<(std::ostream &, Angle const &)
static UnitVector3d northFrom(Vector3d const &v)
northFrom returns the unit vector orthogonal to v that points "north" from v.
Vector3d is a vector in ℝ³ with components stored in double precision.
double sin(Angle const &a)
double cos(Angle const &a)
This file declares a class for representing unit vectors in ℝ³.
Vector3d cross(Vector3d const &v) const
cross returns the cross product of this unit vector and v.
A base class for image defects.
bool isZero() const
isZero returns true if all the components of this vector are zero.
Angle represents an angle in radians.
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
UnitVector3d()
The default constructor creates a unit vector equal to (1, 0, 0).