Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
tools.hpp File Reference
#include <boost/algorithm/clamp.hpp>
#include <algorithm>
#include <cstddef>
#include <map>
#include <new>
#include "inexor/io/legacy/stream.hpp"
#include "inexor/network/SharedTree.hpp"
#include "inexor/network/legacy/cube_network.hpp"
#include "inexor/shared/cube_endian.hpp"
#include "inexor/shared/cube_formatting.hpp"
#include "inexor/shared/cube_hash.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/cube_unicode.hpp"
#include "inexor/shared/cube_vector.hpp"
#include "inexor/util/random.hpp"

Go to the source code of this file.

Functions

static int bitscan (uint mask)
 Search the mask data from least significant bit(LSB) to the most significant bit(MSB) for a set bit(1). More...
 
int rnd (int Rmax)
 Function alias. Should be replaced inline actually! More...
 
float rndscale (float Rmax)
 
float detrnd (int seed, int Rmax)
 

Function Documentation

static int bitscan ( uint  mask)
inlinestatic

Search the mask data from least significant bit(LSB) to the most significant bit(MSB) for a set bit(1).

Returns
the position of first set bit (1) found.

Referenced by selgridmap().

float detrnd ( int  seed,
int  Rmax 
)
inline
int rnd ( int  Rmax)
inline
float rndscale ( float  Rmax)
inline