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