lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

Adam D. Moss wrote:
> I guess the 'right' solution is telling DirectX to leave doubles
> as doubles.
> 
> I wonder if there's a run-time test for this mishap?

Initialize DirectX/Direct3D _first_, then run this code:

-- For Lua 5.1-alpha with the new number2int macro:
assert(({1})[1] == 1)

-- For any Lua version:
assert(1e9+1 ~= 1e9)
assert(1/(2^300) ~= 0)

(Untested -- tell me if this works)

Bye,
     Mike