SharedMeatAxe  1.0
Miscellaneous

Detailed Description

Functions

long gcd (long a, long b)
 Greatest Common Divisor. More...
 
long lcm (long a, long b)
 Least Common Multiple. More...
 
void MtxRandomInit (unsigned x)
 Initialize the random number generator. More...
 
long MtxRandom (void)
 Get the next (Pseudo-)Random number. More...
 
int MtxRandomInt (int max)
 Random number. More...
 

Function Documentation

long gcd ( long  a,
long  b 
)

Greatest Common Divisor.

This function returns the greatest common divisor of two integers. If both numbers are positive, the result is positive. If one or both numbers are negative, the result may be positive or negative. If one of the numbers is zero, the function returns the other number. If both numbers are zero, the result is zero.

Parameters
aFirst number.
bSecond number.
Returns
Greatest common divisor of a and b.
long lcm ( long  a,
long  b 
)

Least Common Multiple.

This function returns the least common multiple of two integers. If both numbers are positive, the result is positive. If one or both numbers are negative, the result may be positive or negative. If both numbers are zero, a division by zero occurs.

Parameters
aFirst number.
bSecond number.
Returns
Least common multiple of a and b.
long MtxRandom ( void  )

Get the next (Pseudo-)Random number.

This function returns a nonnegative (pseudo) random number.

Returns
Pseudo random number.
void MtxRandomInit ( unsigned  x)

Initialize the random number generator.

Parameters
xSeed value.
int MtxRandomInt ( int  max)

Random number.

This function returns a (pseudo) random number in the range 0...max. The argument must be greater than 0.

Returns
Pseudo random number.

SharedMeatAxe 1.0 documentation, generated on Sat Dec 30 2017 12:13:21