karbon

VGlobal Namespace Reference


Functions

int binomialCoeff (unsigned n, unsigned k)
double factorialLn (unsigned n)
double gammaLn (double x)
int sign (double a)

Variables

const double pi = 3.14159265358979323846
const double twopi = 6.28318530717958647692
const double pi_2 = 1.57079632679489661923
const double pi_180 = 0.01745329251994329576
const double one_pi_180 = 57.29577951308232087684
const double sqrt2 = 1.41421356237309504880
const double one_3 = 0.33333333333333333333
const double two_3 = 0.66666666666666666667
const double one_6 = 0.16666666666666666667
const double one_7 = 0.14285714285714285714
const double veryBigNumber = 1.0e8
const double verySmallNumber = 1.0e-8
const double flatnessTolerance = 0.01
const double lengthTolerance = 0.005
const double paramLengthTolerance = 0.001
const double isNearRange = 0.001
const double parallelTolerance = 0.99

Function Documentation

int VGlobal::binomialCoeff ( unsigned  n,
unsigned  k 
)

Calculates the binomial coefficient n! / ( k! * ( n - k)! ).

Definition at line 28 of file vglobal.cc.

double VGlobal::factorialLn ( unsigned  n  ) 

Calculates the value ln( n! ).

Definition at line 40 of file vglobal.cc.

double VGlobal::gammaLn ( double  x  ) 

Calculates the value ln| Gamma(x) | for x > 0.

Definition at line 64 of file vglobal.cc.

int VGlobal::sign ( double  a  )  [inline]

Returns the sign of paramater a.

Definition at line 85 of file vglobal.h.


Variable Documentation

const double VGlobal::flatnessTolerance = 0.01

A bezier with this flatness is considered "flat".

Used in subdividing.

Definition at line 53 of file vglobal.h.

const double VGlobal::isNearRange = 0.001

A range for KoPoint::isNear() check, to decide if a KoPoint "is the same" as another.

Definition at line 74 of file vglobal.h.

const double VGlobal::lengthTolerance = 0.005

A tolerance used to approximate bezier lengths.

If the relative difference between chordlength and polylength (length of the controlpolygon) is smaller than this value, the length of the bezier is 1/2 chordlength + 1/2 polylength.

Definition at line 60 of file vglobal.h.

const double VGlobal::parallelTolerance = 0.99

A tolerance for multiplying normalized (length=1) vectors.

A result of >= parallelTolerance indicates parallel vectors.

Definition at line 80 of file vglobal.h.

const double VGlobal::paramLengthTolerance = 0.001

A tolerance used to calculate param t on a segment at a given arc length (counting from t=0).

If the relative difference between a length approximation and the given length is smaller than this value, they are assumed to be identical.

Definition at line 68 of file vglobal.h.

const double VGlobal::veryBigNumber = 1.0e8

Constants used to decide if a number is equal zero or nearly the same as another number.

Definition at line 47 of file vglobal.h.

KDE Home | KDE Accessibility Home | Description of Access Keys