generate_canonical
傳回一連串隨機浮點值。
template<class RealType,
size_t bits,
class Engine>
RealType generate_canonical(Engine& gen);
參數
- gen
亂數產生器。
備註
樣板的函式呼叫gen()重複套件傳回的值為浮點值,並x型別的RealType之前就已經集結假數中的位元指定的數字x。 指定的數字是較小的bits (其必須為非零) 和完整的數字,假數中的位元RealType。 第一次呼叫所提供的最低階位元。 函式會傳回x。
需求
標頭: <random>
Namespace: 標準