this way? function rand(uint min, uint max) public returns (uint){ nonce++; //return uint(sha3(nonce))%(min+max)-min; result = uint(keccak256(nonce))%(min+max)-min; return result; } this returns me a number like "115792089237316195423570985008687907853269984665640564039457584007913129639933"
Take modulus of this %10
Weird how can it return such a large number with modulus lol
Обсуждают сегодня