| 335 | #define scaleFIG (l_mathop(0.5) / ((Rand64)1 << (FIGS - 1))) |
| 336 | |
| 337 | static lua_Number I2d (Rand64 x) { |
| 338 | return (lua_Number)(trim64(x) >> shift64_FIG) * scaleFIG; |
| 339 | } |
| 340 | |
| 341 | /* convert a 'Rand64' to a 'lua_Unsigned' */ |
| 342 | #define I2UInt(x) ((lua_Unsigned)trim64(x)) |