Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lrt::Math Class Reference

Class Math provides some static helper functions to compute often-used mathematical functions in a system-independent manner. More...

#include <rtmath.h>

List of all members.

Static Public Methods

int max (int num1, int num2)
 Returns the bigger one of the given integers. More...

int min (int num1, int num2)
 Returns the smaller one of the given integers. More...

int abs (int num)
 Returns the absolute value of the given integer. More...

int rand (int from, int to)
 Creates a pseudorandom number between (and including) the values from and to.
If you do not use seed() or randomize() before using rand(), it will initialize itself to return randomized numbers.


void seed (unsigned long seed)
 Creates reproducable pseudorandom numbers by seeding the random number generator with a fix number.

void randomize ()
 Creates unreproducable, but "really random" numbers by seeding the random number generator with a number from a random source (usually the system timer).

double sqrt (double num)
 Computes the square root of num.

double log10 (double num)
double ln (double num)
double exp (double num)
double sin (double num)
double cos (double num)
double tan (double num)

Static Public Attributes

const int MAX_INT = 2147483647
 The largest positive value which is representable as a 32-bit integer.

const int MIN_INT = -2147483647-1
 The largest negative value which is representable as a 32-bit integer.

const double PI = 3.14159265359
 The most possibly exact representation of the number Pi.

const double E = 2.71828182846
 The most possibly exact representation of the number e (the base of the natural logarithm).


Detailed Description

Class Math provides some static helper functions to compute often-used mathematical functions in a system-independent manner.

Currently under construction.


Member Function Documentation

int lrt::Math::abs (  int    num )  [inline, static]
 

Returns the absolute value of the given integer.

Note: This function is inline and will be translated into the usual code. So please use it to enhance code readability.

int lrt::Math::max (  int    num1,
int    num2
)  [inline, static]
 

Returns the bigger one of the given integers.

Note: This function is inline and will be translated into the usual code. So please use it to enhance code readability.

int lrt::Math::min (  int    num1,
int    num2
)  [inline, static]
 

Returns the smaller one of the given integers.

Note: This function is inline and will be translated into the usual code. So please use it to enhance code readability.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer