Rand- 16 bits only????

Miscellaneous Forums/Blitz Showcase/Rand- 16 bits only????

whoah. cool. It sounds nice. how would this look in blitz code?

somthing like

global x1,x2,x3,x4,C

function rand()
 S=2111111111*X1+1492*X2+1776*X3+5115*X4+C
 x1=x2
 x2=x3
 x3=x4
 x4=S Mod 232
 C=floor(S/232)
end function


Hmm. must have done somthing wrong it's always between -256 and 256.