gsgl::math Namespace Reference


Classes

class  euler_solver
 Euler's method solver. More...
struct  info
class  julian_day
class  math_object
class  matrix
 A generic matrix class. More...
class  quaternion
 Quaternion class. More...
class  runge_kutta_solver
 The venerable Runge-Kutta solver. More...
class  solver
 Base class for numerical equation solvers, where the equation is x' = f(t, x). More...
class  transform
 A 4x4 matrix used in 3d coordinate system transformations. More...
class  vector
 A vector for storing homogenous coordinates. More...

Namespaces

namespace  matrix_utils
namespace  units

Functions

template<typename R>
clamp (const R &val, const R &min, const R &max)
vector operator* (const vector &v, gsgl::real_t n)
 Multiplies a vector by a scalar.
vector operator* (gsgl::real_t n, const vector &v)
 Multiplies a vector by a scalar.
vector operator/ (const vector &v, gsgl::real_t n)
 Divides a vector by a scalar.

Variables

const double DEG2RAD = M_PI / 180.0
const double PI = M_PI
const double PI_OVER_2 = M_PI * 0.5
const double PI_TIMES_2 = M_PI * 2.0
const double RAD2DEG = 180.0 / M_PI


Function Documentation

R gsgl::math::clamp ( const R &  val,
const R &  min,
const R &  max 
) [inline]

Definition at line 77 of file math.hpp.

Referenced by stellar_db::load_db().

vector gsgl::math::operator* ( const vector &  v,
gsgl::real_t  n 
) [inline]

vector gsgl::math::operator* ( gsgl::real_t  n,
const vector &  v 
) [inline]

Multiplies a vector by a scalar.

Definition at line 116 of file vector.hpp.

References vector::get_x(), vector::get_y(), and vector::get_z().

vector gsgl::math::operator/ ( const vector &  v,
gsgl::real_t  n 
) [inline]

Divides a vector by a scalar.

Definition at line 130 of file vector.hpp.


Variable Documentation

MATH_API const double DEG2RAD = M_PI / 180.0

MATH_API const double PI = M_PI

MATH_API const double PI_OVER_2 = M_PI * 0.5

Definition at line 48 of file math.cpp.

Referenced by body_rotator::calc_orientation_aux(), and simple_sphere::simple_sphere().

MATH_API const double PI_TIMES_2 = M_PI * 2.0

Definition at line 47 of file math.cpp.

Referenced by clipmap_ring::init(), and simple_sphere::simple_sphere().

MATH_API const double RAD2DEG = 180.0 / M_PI

Definition at line 51 of file math.cpp.


Generated on Sat Mar 1 13:50:06 2008 for Periapsis Project by  doxygen 1.5.5