Vector
-
class Vector
Vector in 3D space.
Public Functions
-
Vector()
Construct zero vector.
-
explicit Vector(double x, double y = 0., double z = 0.)
Construct vector with given coordinates.
-
double magnitude() const
Compute magnitude of the vector.
- Returns:
MAgnitude of the vector
-
void normalize()
Normalize the vector.
-
void rotate(const Axis1 &axis, double angle)
Rotate vector around axis.
- Parameters:
axis – Axis of rotation
angle – Angle of rotation
-
Vector()