kn Namespace Reference


Classes

class  Complex
 Generic complex number class (genereic for type). More...
class  MathException
 Exception thrown in case of math error. More...
class  Matrix
 class to manipulate a matrix More...
class  Matrix3x3
class  Matrix4x4
class  Vector
 Generic vector class (genereic for size and type). More...
class  Vector2
class  Vector3
class  Vector4

Typedefs

typedef Matrix< float > Matrixf
typedef Matrix< double > Matrixd
typedef Matrix< int > Matrixi
typedef Matrix3x3< float > Matrix3x3f
typedef Matrix3x3< double > Matrix3x3d
typedef Matrix3x3< int > Matrix3x3i
typedef Matrix4x4< float > Matrix4x4f
typedef Matrix4x4< double > Matrix4x4d
typedef Matrix4x4< int > Matrix4x4i
typedef Vector< float > Vectorf
typedef Vector< double > Vectord
typedef Vector< int > Vectori
typedef Vector2< float > Vector2f
typedef Vector2< double > Vector2d
typedef Vector2< int > Vector2i
typedef Vector2< unsigned int > Vector2u
typedef Vector3< float > Vector3f
typedef Vector3< double > Vector3d
typedef Vector3< int > Vector3i
typedef Vector4< float > Vector4f
typedef Vector4< double > Vector4d
typedef Vector4< int > Vector4i

Functions

Matrix< double > inverseMatrixSVD (const Matrix< double > &m)
 Compute the inverse of a given square matrix The inverse is given by A^(-1) = V*[1/D]*U^(t) with V, D and U computed with the SVD.
Matrix< double > pseudoInverseMatrixSVD (const Matrix< double > &m)
 Compute the pseudo-inverse of a given singular matrix The pseudo-inverse is given by A^(+) = (A^(T)*A)^(-1)*A^(T) (A^(T)*A)^(-1) is computed using SVD inverting process.
Matrix< double > inverseMatrixGaussianElimination (const Matrix< double > &m, const bool total=false)
 Compute the inverse of a given square matrix The inverse is computed with a gaussian elimination.
Matrix< double > pseudoInverseMatrixGaussianElimination (const Matrix< double > &m, const bool total=false)
 Compute the pseudo-inverse of a given singular matrix The pseudo-inverse is given by A^(+) = (A^(T)*A)^(-1)*A^(T) (A^(T)*A)^(-1) is computed using a gaussian elimation inverting process.
std::ostream & operator<< (std::ostream &stream, const MathException &err)
 Operator << for MathException.
bool skipEmptyLines (std::ifstream &dataFile)
bool skipComments (std::ifstream &dataFile)
bool readSize (std::ifstream &dataFile, const std::string &keyword, double &value)
bool readMatrixHeader (std::ifstream &matrixFile, unsigned int &row, unsigned int &column)
template<class T >
void exportMatrix (const Matrix< T > &M, const std::string &fileName, const bool &headerMode=false, const std::string &comments="")
 Export a matrix in a file.
template<class T >
void loadMatrix (Matrix< T > &M, const std::string &fileName)
 Load a matrix from a file.
static double degToRad (const double &deg)
 Convert degrees to radians.
static double radToDeg (const double &rad)
 Convert radians to degrees.
static double pythag (const double &a, const double &b)
 Computes (a^2 + b^2)^1/2 without destructive underflow or overflow Algorithm from Numerical Recipes Second Edition (1992).
template<class T >
static T setSign (const T &a, const T &b)
 set a with the same sign than b
template<class T >
static T getSign (const T &a)
 Return the sign of a.
static bool isPowerOfTwo (const unsigned int &n)
 check if n is a power of two or not
static unsigned int ceilPowerOfTwo (const unsigned int &n)
 Return the highest power of two value close to n.
static unsigned int floorPowerOfTwo (const unsigned int &n)
 Return the lowest power of two value close to n.
template<class U >
std::ostream & operator<< (std::ostream &stream, const Matrix< U > &m)
 Redefines display for a matrix.
template<class U >
Vector< U > operator* (const Vector< U > &v, const Matrix< U > &m)
 Multiplies a vector with a matrix.
template<class U >
Matrix< U > operator* (const U &d, const Matrix< U > &m)
 Multiplies a scalar with a matrix.
template<class U >
Vector< U > operator* (const Vector3< U > &v, const Matrix3x3< U > &m)
 Multiplies a vector with a matrix.
template<class U >
Matrix3x3< U > operator* (const U &d, const Matrix3x3< U > &m)
 Multiplies a scalar with a matrix3x3.
template<class U >
Vector4< U > operator* (const Vector4< U > &v, const Matrix4x4< U > &m)
 Multiplies a vector with a matrix.
template<class U >
Matrix4x4< U > operator* (const U &d, const Matrix4x4< U > &m)
 Multiplies a scalar with a matrix4x4.
template<class T >
void qrDecomposition (const Matrix< T > &A, Matrix< T > &R, Matrix< T > &Q)
 Computes a QR decomposition of a nxn matrix A where R is a upper triangular nxn matrix and Q is a nxn orthogonal matrix.
template<class T >
void rqDecomposition3x3 (const Matrix< T > &A, Matrix< T > &R, Matrix< T > &Q)
 Computes a RQ decomposition of a 3x3 matrix A where R is a upper triangular 3x3 matrix and Q is a 3x3 orthogonal matrix.
template<class T >
void rq3x3MakePositiveDiagonal (Matrix< T > &R, Matrix< T > &Q)
 Update the 3x3 RQ decomposition such the diagonal elements of R are positive.
void solveSystemSVD (const Matrix< double > &a, Vector< double > &x, const Vector< double > &b)
 Resolve the system Ax=b using a SVD Only x is modified and contains the result Based on Numerical Recipes Second Edition (1992).
void solveNullSystemSVD (const Matrix< double > &a, Vector< double > &x)
 Resolve the system Ax=0 using a SVD Only x is modified and contains the result Based on multiple view geometry p73 p564.
void solveSystemGaussianElimination (const Matrix< double > &a, Vector< double > &x, const Vector< double > &b, const bool total=false)
 Resolve the system Ax=b using a gaussian elimination Only x is modified and contains the result.
void decompositionSVD (Matrix< double > &a, Vector< double > &w, Matrix< double > &v)
 Construct the Singular value Decomposition of a matrix M The SVD is given as A = UwV^T In our case, U will replace A The following used algorithm comes from Numerical Recipes Second Edition (1992).
void sortSingularValuesSVD (Matrix< double > &u, Vector< double > &w, Matrix< double > &v)
 Put in decreasing order the singular values (vector w) The sorting algorithm used is the bubble sort.
void solveSVD (const Matrix< double > &u, const Vector< double > &w, const Matrix< double > &v, const Vector< double > &b, Vector< double > &x)
 Resolve the system (uwv)x=b with uwv the singular value decomposition of a matrix A The following used algorithm comes from Numerical Recipes Second Edition (1992).
template<class U >
std::ostream & operator<< (std::ostream &stream, const Vector< U > &v)
 operator <<
template<class U >
Vector< U > operator* (const U &d, const Vector< U > &v)
 Multiplies a value with a Vector.
template<class U >
Vector2< U > operator* (const U &d, const Vector2< U > &v)
 Multiplies a value with a Vector2.
template<class U >
Vector3< U > operator* (const U &d, const Vector3< U > &v)
 Multiplies a value with a Vector3.
template<class U >
Vector4< U > operator* (const U &d, const Vector4< U > &v)
 Multiplies a value with a Vector4.

Variables

static const double PI = 3.14159265358979323846
 PI.
static const double TWO_PI = 6.28318530717958647692
 2*PI
static const double PI_TWO = 1.57079632679489661923
 PI/2.
static const double PI_FOUR = 0.78539816339744830962
 PI/4.
static const double DEG2RAD = 0.01745329251994329576
 Convertion factor from degrees to radians.
static const double RAD2DEG = 57.2957795130823208767
 Convertion factor from radians to degrees.
static const double GOLDEN_NUMBER = 1.61803398874989484820
 The golden number (1+sqrt(5))/2.

Typedef Documentation

typedef Matrix3x3<double> kn::Matrix3x3d

Definition at line 654 of file Matrix3x3.hpp.

typedef Matrix3x3<float> kn::Matrix3x3f

Definition at line 653 of file Matrix3x3.hpp.

typedef Matrix3x3<int> kn::Matrix3x3i

Definition at line 655 of file Matrix3x3.hpp.

typedef Matrix4x4<double> kn::Matrix4x4d

Definition at line 623 of file Matrix4x4.hpp.

typedef Matrix4x4<float> kn::Matrix4x4f

Definition at line 622 of file Matrix4x4.hpp.

typedef Matrix4x4<int> kn::Matrix4x4i

Definition at line 624 of file Matrix4x4.hpp.

typedef Matrix<double> kn::Matrixd

Definition at line 1395 of file Matrix.hpp.

typedef Matrix<float> kn::Matrixf

Definition at line 1394 of file Matrix.hpp.

typedef Matrix<int> kn::Matrixi

Definition at line 1396 of file Matrix.hpp.

typedef Vector2<double> kn::Vector2d

Definition at line 394 of file Vector2.hpp.

typedef Vector2<float> kn::Vector2f

Definition at line 393 of file Vector2.hpp.

typedef Vector2<int> kn::Vector2i

Definition at line 395 of file Vector2.hpp.

typedef Vector2<unsigned int> kn::Vector2u

Definition at line 396 of file Vector2.hpp.

typedef Vector3<double> kn::Vector3d

Definition at line 469 of file Vector3.hpp.

typedef Vector3<float> kn::Vector3f

Definition at line 468 of file Vector3.hpp.

typedef Vector3<int> kn::Vector3i

Definition at line 470 of file Vector3.hpp.

typedef Vector4<double> kn::Vector4d

Definition at line 522 of file Vector4.hpp.

typedef Vector4<float> kn::Vector4f

Definition at line 521 of file Vector4.hpp.

typedef Vector4<int> kn::Vector4i

Definition at line 523 of file Vector4.hpp.

typedef Vector<double> kn::Vectord

Definition at line 851 of file Vector.hpp.

typedef Vector<float> kn::Vectorf

Definition at line 850 of file Vector.hpp.

typedef Vector<int> kn::Vectori

Definition at line 852 of file Vector.hpp.


Function Documentation

static unsigned int kn::ceilPowerOfTwo ( const unsigned int &  n  )  [inline, static]

Return the highest power of two value close to n.

Parameters:
n the reference value
Returns:
the closest highest power of two value

Definition at line 134 of file MathTools.hpp.

void kn::decompositionSVD ( Matrix< double > &  a,
Vector< double > &  w,
Matrix< double > &  v 
)

Construct the Singular value Decomposition of a matrix M The SVD is given as A = UwV^T In our case, U will replace A The following used algorithm comes from Numerical Recipes Second Edition (1992).

Parameters:
a the input matrix that will be replaced by U (size m x n)
w the diagonal matrix constructed as a vector with the singular values (size n)
v the orthogonal matrix (not transposed) (size n)
Exceptions:
MathException invalid size of w or v

Definition at line 34 of file SVD.cpp.

static double kn::degToRad ( const double &  deg  )  [static]

Convert degrees to radians.

Parameters:
deg value in degrees
Returns:
value in radians

Definition at line 72 of file MathTools.hpp.

template<class T >
void kn::exportMatrix ( const Matrix< T > &  M,
const std::string &  fileName,
const bool &  headerMode = false,
const std::string &  comments = "" 
) [inline]

Export a matrix in a file.

The format is : some optional comments begining by '#', a optional header writing "row " and the number of rows, in the next line, "column " and the number of columns, and then, line by line, the matrix content.

Parameters:
M the matrix to be exported
fileName the name of the target file
headerMode if true, write the number of row and colums before the data, else write directly the data
comments add some comments at the begining of the file, the caracter "#" is automatically added
Exceptions:
MathException error opening file
Author:
Vincent

Definition at line 74 of file MathIO.hpp.

static unsigned int kn::floorPowerOfTwo ( const unsigned int &  n  )  [inline, static]

Return the lowest power of two value close to n.

Parameters:
n the reference value
Returns:
the closest lowest power of two value

Definition at line 152 of file MathTools.hpp.

template<class T >
static T kn::getSign ( const T &  a  )  [inline, static]

Return the sign of a.

Parameters:
a the value from which we need the sign
Returns:
the sign

Definition at line 114 of file MathTools.hpp.

Matrix< double > kn::inverseMatrixGaussianElimination ( const Matrix< double > &  m,
const bool  total = false 
)

Compute the inverse of a given square matrix The inverse is computed with a gaussian elimination.

Parameters:
m a square matrix
total true to perform a total elimation (including rows permutations : slower, more accurate), false for a partial elimation.
Returns:
the inverse of the input matrix
Exceptions:
MathException the parameter is not a square matrix

Definition at line 68 of file InverseMatrix.cpp.

Matrix< double > kn::inverseMatrixSVD ( const Matrix< double > &  m  ) 

Compute the inverse of a given square matrix The inverse is given by A^(-1) = V*[1/D]*U^(t) with V, D and U computed with the SVD.

Parameters:
m a square matrix
Returns:
the inverse of the input matrix
Exceptions:
MathException the parameter is not a square matrix

Definition at line 28 of file InverseMatrix.cpp.

static bool kn::isPowerOfTwo ( const unsigned int &  n  )  [inline, static]

check if n is a power of two or not

Parameters:
n the tested value
Returns:
true if n is a power of two, false otherwise

Definition at line 124 of file MathTools.hpp.

template<class T >
void kn::loadMatrix ( Matrix< T > &  M,
const std::string &  fileName 
) [inline]

Load a matrix from a file.

The format is : some optional comments begining by '#', a optional header writing "row " and the number of rows, in the next line, "coluln " and the number of columns, and then, line by line, the matrix content.

Parameters:
M the matrix to be loaded
fileName the name of the file to open
Exceptions:
MathException matrix size is incorrect / error opening file / invalid format
Author:
Vincent

Definition at line 120 of file MathIO.hpp.

template<class U >
Vector4<U> kn::operator* ( const U &  d,
const Vector4< U > &  v 
) [inline]

Multiplies a value with a Vector4.

Parameters:
d the value multiplied with this Vector4
v the vector4
Returns:
a copy of the Vector4

Definition at line 510 of file Vector4.hpp.

template<class U >
Vector3<U> kn::operator* ( const U &  d,
const Vector3< U > &  v 
) [inline]

Multiplies a value with a Vector3.

Parameters:
d the value multiplied with this Vector3
v the vector3
Returns:
a copy of the Vector3

Definition at line 457 of file Vector3.hpp.

template<class U >
Vector2<U> kn::operator* ( const U &  d,
const Vector2< U > &  v 
) [inline]

Multiplies a value with a Vector2.

Parameters:
d the value multiplied with this Vector2
v the vector2
Returns:
a copy of the Vector2

Definition at line 382 of file Vector2.hpp.

template<class U >
Vector<U> kn::operator* ( const U &  d,
const Vector< U > &  v 
) [inline]

Multiplies a value with a Vector.

Parameters:
d the value multiplied with this Vector
v the vector
Returns:
a copy of the Vector

Definition at line 841 of file Vector.hpp.

template<class U >
Matrix4x4<U> kn::operator* ( const U &  d,
const Matrix4x4< U > &  m 
) [inline]

Multiplies a scalar with a matrix4x4.

Parameters:
d a scalar
m the matrix4x4
Returns:
a matrix4x4

Definition at line 612 of file Matrix4x4.hpp.

template<class U >
Vector4<U> kn::operator* ( const Vector4< U > &  v,
const Matrix4x4< U > &  m 
) [inline]

Multiplies a vector with a matrix.

Parameters:
v the vector
m the matrix
Returns:
a matrix
Exceptions:
MathException matrix size is incorrect

Definition at line 426 of file Matrix4x4.hpp.

template<class U >
Matrix3x3<U> kn::operator* ( const U &  d,
const Matrix3x3< U > &  m 
) [inline]

Multiplies a scalar with a matrix3x3.

Parameters:
d a scalar
m the matrix3x3
Returns:
a matrix3x3

Definition at line 643 of file Matrix3x3.hpp.

template<class U >
Vector<U> kn::operator* ( const Vector3< U > &  v,
const Matrix3x3< U > &  m 
) [inline]

Multiplies a vector with a matrix.

Parameters:
v the vector
m the matrix
Returns:
a matrix
Exceptions:
MathException matrix size is incorrect

Definition at line 448 of file Matrix3x3.hpp.

template<class U >
Matrix<U> kn::operator* ( const U &  d,
const Matrix< U > &  m 
) [inline]

Multiplies a scalar with a matrix.

Parameters:
d a scalar
m the matrix
Returns:
a matrix

Definition at line 1385 of file Matrix.hpp.

template<class U >
Vector<U> kn::operator* ( const Vector< U > &  v,
const Matrix< U > &  m 
) [inline]

Multiplies a vector with a matrix.

Parameters:
v the vector
m the matrix
Returns:
a vector
Exceptions:
MathException matrix or vector size is incorrect

Definition at line 1363 of file Matrix.hpp.

template<class U >
std::ostream& kn::operator<< ( std::ostream &  stream,
const Vector< U > &  v 
) [inline]

operator <<

Parameters:
stream output stream
v Vector to print
Returns:
output stream

Definition at line 823 of file Vector.hpp.

template<class U >
std::ostream& kn::operator<< ( std::ostream &  stream,
const Matrix< U > &  m 
) [inline]

Redefines display for a matrix.

Parameters:
stream the output stream
m the matrix
Returns:
a stream

Definition at line 1346 of file Matrix.hpp.

std::ostream& kn::operator<< ( std::ostream &  stream,
const MathException &  err 
) [inline]

Operator << for MathException.

Parameters:
stream output stream
err MathException to print
Returns:
output stream

Definition at line 93 of file MathException.hpp.

Matrix< double > kn::pseudoInverseMatrixGaussianElimination ( const Matrix< double > &  m,
const bool  total = false 
)

Compute the pseudo-inverse of a given singular matrix The pseudo-inverse is given by A^(+) = (A^(T)*A)^(-1)*A^(T) (A^(T)*A)^(-1) is computed using a gaussian elimation inverting process.

Parameters:
m a matrix
total true to perform a total elimation (including rows permutations : slower, more accurate), false for a partial elimation.
Returns:
the pseudo-inverse of the input matrix

Definition at line 74 of file InverseMatrix.cpp.

Matrix< double > kn::pseudoInverseMatrixSVD ( const Matrix< double > &  m  ) 

Compute the pseudo-inverse of a given singular matrix The pseudo-inverse is given by A^(+) = (A^(T)*A)^(-1)*A^(T) (A^(T)*A)^(-1) is computed using SVD inverting process.

Parameters:
m a matrix
Returns:
the pseudo-inverse of the input matrix

Definition at line 57 of file InverseMatrix.cpp.

static double kn::pythag ( const double &  a,
const double &  b 
) [static]

Computes (a^2 + b^2)^1/2 without destructive underflow or overflow Algorithm from Numerical Recipes Second Edition (1992).

Parameters:
a first value
b second value
Returns:
(a^2 + b^2)^1/2

Definition at line 89 of file MathTools.hpp.

template<class T >
void kn::qrDecomposition ( const Matrix< T > &  A,
Matrix< T > &  R,
Matrix< T > &  Q 
) [inline]

Computes a QR decomposition of a nxn matrix A where R is a upper triangular nxn matrix and Q is a nxn orthogonal matrix.

From "Multiple View Geometry" 2nd Edition, Hartley Zisserman, Appendix 4 : Matrix Properties and Decompositions, A4.1.2 : Householder matrices and QR decomposition. Note : this decomposition is not unique. For this fuction, the matrice template type should be float, double or long double.

Parameters:
A : nxn input matrix
R : nxn upper triangular matrix to be computed
Q : nxn orthogonal matrix to be computed
Exceptions:
MathException the input matrices are not square matrix
MathException the input matrices does not have the same size

Definition at line 58 of file RQDecomposition.hpp.

static double kn::radToDeg ( const double &  rad  )  [static]

Convert radians to degrees.

Parameters:
rad value in radians
Returns:
value in degrees

Definition at line 79 of file MathTools.hpp.

bool kn::readMatrixHeader ( std::ifstream &  matrixFile,
unsigned int &  row,
unsigned int &  column 
)

Definition at line 168 of file MathIO.cpp.

bool kn::readSize ( std::ifstream &  dataFile,
const std::string &  keyword,
double &  value 
)

Definition at line 132 of file MathIO.cpp.

template<class T >
void kn::rq3x3MakePositiveDiagonal ( Matrix< T > &  R,
Matrix< T > &  Q 
) [inline]

Update the 3x3 RQ decomposition such the diagonal elements of R are positive.

The correction is performed by a modification on the Q matrix, which remains a 3x3 orthogonal matrix.

Parameters:
R : 3x3 upper triangular 3x3 matrix
Q : 3x3 orthogonal matrix
Exceptions:
MathException the input matrices are not 3x3 matrices

Definition at line 176 of file RQDecomposition.hpp.

template<class T >
void kn::rqDecomposition3x3 ( const Matrix< T > &  A,
Matrix< T > &  R,
Matrix< T > &  Q 
) [inline]

Computes a RQ decomposition of a 3x3 matrix A where R is a upper triangular 3x3 matrix and Q is a 3x3 orthogonal matrix.

From "Multiple View Geometry", Hartley Zisserman, Appendix 3 : Numerical algorithms, A3.1.1. Note : this decomposition is not unique and for computer vision applications, especially the internal parameters and rotation matrix extraction, the focal parameter (2 first elements on the R matrix diagonal) computed with this method can be negative. To ensure positive focal parameters, the user should check the decomposition with the rq3x3MakePositiveDiagonal function. For this fuction, the matrice template type should be float, double or long double.

Parameters:
A : 3x3 input matrix
R : 3x3 upper triangular 3x3 matrix to be computed
Q : 3x3 orthogonal matrix to be computed
Exceptions:
MathException the input matrices are not 3x3 matrices

Definition at line 117 of file RQDecomposition.hpp.

template<class T >
static T kn::setSign ( const T &  a,
const T &  b 
) [inline, static]

set a with the same sign than b

Parameters:
a the value which the sign will be modified to the sign of b
b the value which we get the sign
Returns:
the value b with the modified sign

Definition at line 105 of file MathTools.hpp.

bool kn::skipComments ( std::ifstream &  dataFile  ) 

Definition at line 94 of file MathIO.cpp.

bool kn::skipEmptyLines ( std::ifstream &  dataFile  ) 

Definition at line 57 of file MathIO.cpp.

void kn::solveNullSystemSVD ( const Matrix< double > &  a,
Vector< double > &  x 
)

Resolve the system Ax=0 using a SVD Only x is modified and contains the result Based on multiple view geometry p73 p564.

Parameters:
a a matrix (size m x n)
x the vector that will contain the result (size n)

Definition at line 43 of file Solver.cpp.

void kn::solveSVD ( const Matrix< double > &  u,
const Vector< double > &  w,
const Matrix< double > &  v,
const Vector< double > &  b,
Vector< double > &  x 
)

Resolve the system (uwv)x=b with uwv the singular value decomposition of a matrix A The following used algorithm comes from Numerical Recipes Second Edition (1992).

Parameters:
u the input matrix that will be replaced by U (size m x n)
w the diagonal matrix constructed as a vector with the singular values (size n)
v the orthogonal matrix (not transposed) (size n x n)
b the solutions vector (size m)
x the output solutions vector (size n)
Exceptions:
MathException invalid size of w, v, b or x

Definition at line 347 of file SVD.cpp.

void kn::solveSystemGaussianElimination ( const Matrix< double > &  a,
Vector< double > &  x,
const Vector< double > &  b,
const bool  total = false 
)

Resolve the system Ax=b using a gaussian elimination Only x is modified and contains the result.

Parameters:
a a matrix (size m x n)
x the vector that will contain the result (size n)
b the solution vector (size m)
total : use the total elimination (slower, more accurate) if true, the partial elimination else (faster).

Definition at line 57 of file Solver.cpp.

void kn::solveSystemSVD ( const Matrix< double > &  a,
Vector< double > &  x,
const Vector< double > &  b 
)

Resolve the system Ax=b using a SVD Only x is modified and contains the result Based on Numerical Recipes Second Edition (1992).

Parameters:
a a matrix (size m x n)
x the vector that will contain the result (size n)
b the solution vector (size m)

Definition at line 31 of file Solver.cpp.

void kn::sortSingularValuesSVD ( Matrix< double > &  u,
Vector< double > &  w,
Matrix< double > &  v 
)

Put in decreasing order the singular values (vector w) The sorting algorithm used is the bubble sort.

Parameters:
u the input matrix that will be replaced by U (size m x n)
w the diagonal matrix constructed as a vector with the singular values (size n)
v the orthogonal matrix (not transposed) (size n x n)
Exceptions:
MathException invalid size of w or v

Definition at line 316 of file SVD.cpp.


Variable Documentation

const double kn::DEG2RAD = 0.01745329251994329576 [static]

Convertion factor from degrees to radians.

Definition at line 55 of file MathTools.hpp.

const double kn::GOLDEN_NUMBER = 1.61803398874989484820 [static]

The golden number (1+sqrt(5))/2.

Definition at line 65 of file MathTools.hpp.

const double kn::PI = 3.14159265358979323846 [static]

PI.

Definition at line 35 of file MathTools.hpp.

const double kn::PI_FOUR = 0.78539816339744830962 [static]

PI/4.

Definition at line 50 of file MathTools.hpp.

const double kn::PI_TWO = 1.57079632679489661923 [static]

PI/2.

Definition at line 45 of file MathTools.hpp.

const double kn::RAD2DEG = 57.2957795130823208767 [static]

Convertion factor from radians to degrees.

Definition at line 60 of file MathTools.hpp.

const double kn::TWO_PI = 6.28318530717958647692 [static]

2*PI

Definition at line 40 of file MathTools.hpp.


Generated on Thu Nov 12 16:06:35 2009 for OpenKN-math by  doxygen 1.5.8