tahoma2d/toonz/sources/stdfx/igs_math_random.h

41 lines
1,017 B
C
Raw Normal View History

2016-03-19 06:57:51 +13:00
#ifndef igs_math_random_h
#define igs_math_random_h
/*
2001-04-25 update
2001-06-19 rename to 'calculator_random_plus_long.h'
2005-02-03 rename to 'ptbl_random.h'
2005-02-10 separete to 'ptbl_random.h' and 'ptbl_random.cxx'
(2005-02-03.thu wrote)
rand()
radhat9とWindowsとでは疑似乱数列が違う
random()radhat9にはあるがMS-Cにはない
:ANSI C/C++
*/
namespace igs
{
namespace math
{
class random
{
public:
random();
/* 乱数種 seed(0〜std::numeric_limits<long>::max()) */
void seed(unsigned long seed);
unsigned long seed(void) const;
/* 乱数生成 0〜std::numeric_limits<long>::max() */
long next(void);
double next_d(void); /* 0 ... 1 */
private:
unsigned long seed_;
};
}
}
#endif /* !igs_math_random_h */