Files
assimp/include/BoostWorkaround/boost/random/uniform_int.hpp
aramis_acg 94d289d1a3 Updated boost workaround. Added -noboost build config to VC8.
Added aiGetVersionMinor, aiGetVersionMajor, aiGetRevision and aiGetLegalInformation(). They allow to query the library version at runtime.
Added reference images for cylindric and spherical mapping.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@255 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-11-29 15:30:50 +00:00

30 lines
494 B
C++

#ifndef BOOST_UNIFORM_INT_INCLUDED
#define BOOST_UNIFORM_INT_INCLUDED
namespace boost
{
template <typename IntType = unsigned int>
class uniform_int
{
public:
typedef IntType type;
uniform_int (IntType _first, IntType _last)
: first (_first)
, last (_last)
{}
IntType operator () (IntType in)
{
return (IntType)((in * ((last-first)/RAND_MAX)) + first);
}
private:
IntType first, last;
};
};
#endif // BOOST_UNIFORM_INT_INCLUDED